Skip to content
This repository has been archived by the owner on Jan 22, 2025. It is now read-only.

Add serialization-control enum for RPC Options (backport #27676) #27791

Merged
merged 2 commits into from
Sep 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions cli-output/src/display.rs
Original file line number Diff line number Diff line change
Expand Up @@ -263,10 +263,14 @@ fn write_transaction<W: io::Write>(
write_status(w, &transaction_status.status, prefix)?;
write_fees(w, transaction_status.fee, prefix)?;
write_balances(w, transaction_status, prefix)?;
write_compute_units_consumed(w, transaction_status.compute_units_consumed, prefix)?;
write_log_messages(w, transaction_status.log_messages.as_ref(), prefix)?;
write_return_data(w, transaction_status.return_data.as_ref(), prefix)?;
write_rewards(w, transaction_status.rewards.as_ref(), prefix)?;
write_compute_units_consumed(
w,
transaction_status.compute_units_consumed.clone().into(),
prefix,
)?;
write_log_messages(w, transaction_status.log_messages.as_ref().into(), prefix)?;
write_return_data(w, transaction_status.return_data.as_ref().into(), prefix)?;
write_rewards(w, transaction_status.rewards.as_ref().into(), prefix)?;
} else {
writeln!(w, "{}Status: Unavailable", prefix)?;
}
Expand Down
19 changes: 10 additions & 9 deletions client/src/mock_sender.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ use {
transaction::{self, Transaction, TransactionError, TransactionVersion},
},
solana_transaction_status::{
EncodedConfirmedBlock, EncodedConfirmedTransactionWithStatusMeta, EncodedTransaction,
option_serializer::OptionSerializer, EncodedConfirmedBlock,
EncodedConfirmedTransactionWithStatusMeta, EncodedTransaction,
EncodedTransactionWithStatusMeta, Rewards, TransactionBinaryEncoding,
TransactionConfirmationStatus, TransactionStatus, UiCompiledInstruction, UiMessage,
UiRawMessage, UiTransaction, UiTransactionStatusMeta,
Expand Down Expand Up @@ -223,14 +224,14 @@ impl RpcSender for MockSender {
fee: 0,
pre_balances: vec![499999999999999950, 50, 1],
post_balances: vec![499999999999999950, 50, 1],
inner_instructions: None,
log_messages: None,
pre_token_balances: None,
post_token_balances: None,
rewards: None,
loaded_addresses: None,
return_data: None,
compute_units_consumed: None,
inner_instructions: OptionSerializer::None,
log_messages: OptionSerializer::None,
pre_token_balances: OptionSerializer::None,
post_token_balances: OptionSerializer::None,
rewards: OptionSerializer::None,
loaded_addresses: OptionSerializer::Skip,
return_data: OptionSerializer::Skip,
compute_units_consumed: OptionSerializer::Skip,
}),
},
block_time: Some(1628633791),
Expand Down
Loading