transaction-status: Add return data to meta (#23688)
* transaction-status: Add return data to meta * Add return data to simulation results * Use pretty-hex for printing return data * Update arg name, make TransactionRecord struct * Rename TransactionRecord -> ExecutionRecord
This commit is contained in:
@@ -34,7 +34,7 @@ impl TransactionStatusService {
|
||||
enable_rpc_transaction_history: bool,
|
||||
transaction_notifier: Option<TransactionNotifierLock>,
|
||||
blockstore: Arc<Blockstore>,
|
||||
enable_cpi_and_log_storage: bool,
|
||||
enable_extended_tx_metadata_storage: bool,
|
||||
exit: &Arc<AtomicBool>,
|
||||
) -> Self {
|
||||
let exit = exit.clone();
|
||||
@@ -51,7 +51,7 @@ impl TransactionStatusService {
|
||||
enable_rpc_transaction_history,
|
||||
transaction_notifier.clone(),
|
||||
&blockstore,
|
||||
enable_cpi_and_log_storage,
|
||||
enable_extended_tx_metadata_storage,
|
||||
) {
|
||||
break;
|
||||
}
|
||||
@@ -66,7 +66,7 @@ impl TransactionStatusService {
|
||||
enable_rpc_transaction_history: bool,
|
||||
transaction_notifier: Option<TransactionNotifierLock>,
|
||||
blockstore: &Arc<Blockstore>,
|
||||
enable_cpi_and_log_storage: bool,
|
||||
enable_extended_tx_metadata_storage: bool,
|
||||
) -> Result<(), RecvTimeoutError> {
|
||||
match write_transaction_status_receiver.recv_timeout(Duration::from_secs(1))? {
|
||||
TransactionStatusMessage::Batch(TransactionStatusBatch {
|
||||
@@ -101,6 +101,7 @@ impl TransactionStatusService {
|
||||
log_messages,
|
||||
inner_instructions,
|
||||
durable_nonce_fee,
|
||||
return_data,
|
||||
} = details;
|
||||
let lamports_per_signature = match durable_nonce_fee {
|
||||
Some(DurableNonceFee::Valid(lamports_per_signature)) => {
|
||||
@@ -156,6 +157,7 @@ impl TransactionStatusService {
|
||||
post_token_balances,
|
||||
rewards,
|
||||
loaded_addresses,
|
||||
return_data,
|
||||
};
|
||||
|
||||
if let Some(transaction_notifier) = transaction_notifier.as_ref() {
|
||||
@@ -167,9 +169,11 @@ impl TransactionStatusService {
|
||||
);
|
||||
}
|
||||
|
||||
if !(enable_cpi_and_log_storage || transaction_notifier.is_some()) {
|
||||
if !(enable_extended_tx_metadata_storage || transaction_notifier.is_some())
|
||||
{
|
||||
transaction_status_meta.log_messages.take();
|
||||
transaction_status_meta.inner_instructions.take();
|
||||
transaction_status_meta.return_data.take();
|
||||
}
|
||||
|
||||
if enable_rpc_transaction_history {
|
||||
@@ -347,6 +351,7 @@ pub(crate) mod tests {
|
||||
)
|
||||
.unwrap(),
|
||||
)),
|
||||
return_data: None,
|
||||
});
|
||||
|
||||
let balances = TransactionBalancesSet {
|
||||
|
||||
Reference in New Issue
Block a user