simulateTransaction can now return accounts modified by the simulation

This commit is contained in:
Michael Vines
2021-05-25 16:44:18 -07:00
parent 54f0fc9f0f
commit cbce440af4
11 changed files with 184 additions and 49 deletions

View File

@ -28,7 +28,7 @@ pub fn get_parsed_token_account(
UiAccount::encode(
pubkey,
account,
&account,
UiAccountEncoding::JsonParsed,
additional_data,
None,
@ -55,7 +55,7 @@ where
let maybe_encoded_account = UiAccount::encode(
&pubkey,
account,
&account,
UiAccountEncoding::JsonParsed,
additional_data,
None,

View File

@ -296,7 +296,7 @@ fn filter_account_result(
Box::new(iter::once(get_parsed_token_account(bank, pubkey, account)))
} else {
Box::new(iter::once(UiAccount::encode(
pubkey, account, encoding, None, None,
pubkey, &account, encoding, None, None,
)))
}
} else {
@ -347,7 +347,7 @@ fn filter_program_results(
Box::new(
keyed_accounts.map(move |(pubkey, account)| RpcKeyedAccount {
pubkey: pubkey.to_string(),
account: UiAccount::encode(&pubkey, account, encoding.clone(), None, None),
account: UiAccount::encode(&pubkey, &account, encoding, None, None),
}),
)
};