Fix Rpc inconsistencies (#7826)
* Update rpc account format: remove byte arrays * Base58-encode pubkeys in getStoragePubkeysForSlot * Update docs
This commit is contained in:
@ -2012,7 +2012,7 @@ mod tests {
|
||||
use solana_client::{
|
||||
mock_rpc_client_request::SIGNATURE,
|
||||
rpc_request::RpcRequest,
|
||||
rpc_response::{Response, RpcResponseContext},
|
||||
rpc_response::{Response, RpcAccount, RpcResponseContext},
|
||||
};
|
||||
use solana_sdk::{
|
||||
account::Account,
|
||||
@ -2700,12 +2700,14 @@ mod tests {
|
||||
let blockhash = Hash::default();
|
||||
let nonce_response = json!(Response {
|
||||
context: RpcResponseContext { slot: 1 },
|
||||
value: json!(Account::new_data(
|
||||
1,
|
||||
&NonceState::Initialized(NonceMeta::new(&config.keypair.pubkey()), blockhash),
|
||||
&system_program::ID,
|
||||
)
|
||||
.unwrap()),
|
||||
value: json!(RpcAccount::encode(
|
||||
Account::new_data(
|
||||
1,
|
||||
&NonceState::Initialized(NonceMeta::new(&config.keypair.pubkey()), blockhash),
|
||||
&system_program::ID,
|
||||
)
|
||||
.unwrap()
|
||||
)),
|
||||
});
|
||||
let mut mocks = HashMap::new();
|
||||
mocks.insert(RpcRequest::GetAccountInfo, nonce_response);
|
||||
@ -2726,12 +2728,14 @@ mod tests {
|
||||
let blockhash = Hash::default();
|
||||
let nonce_authority_response = json!(Response {
|
||||
context: RpcResponseContext { slot: 1 },
|
||||
value: json!(Account::new_data(
|
||||
1,
|
||||
&NonceState::Initialized(NonceMeta::new(&bob_pubkey), blockhash),
|
||||
&system_program::ID,
|
||||
)
|
||||
.unwrap()),
|
||||
value: json!(RpcAccount::encode(
|
||||
Account::new_data(
|
||||
1,
|
||||
&NonceState::Initialized(NonceMeta::new(&bob_pubkey), blockhash),
|
||||
&system_program::ID,
|
||||
)
|
||||
.unwrap()
|
||||
)),
|
||||
});
|
||||
let mut mocks = HashMap::new();
|
||||
mocks.insert(RpcRequest::GetAccountInfo, nonce_authority_response);
|
||||
|
Reference in New Issue
Block a user