diff --git a/core/src/rpc.rs b/core/src/rpc.rs index 5af070c894..18f66fc01d 100644 --- a/core/src/rpc.rs +++ b/core/src/rpc.rs @@ -264,10 +264,7 @@ impl JsonRpcRequestProcessor { get_encoded_account(&bank, &pubkey, encoding.clone(), config.data_slice)?; accounts.push(response_account) } - Ok(Response { - context: RpcResponseContext { slot: bank.slot() }, - value: accounts, - }) + Ok(new_response(&bank, accounts)) } pub fn get_minimum_balance_for_rent_exemption( @@ -779,10 +776,7 @@ impl JsonRpcRequestProcessor { }; statuses.push(status); } - Ok(Response { - context: RpcResponseContext { slot: bank.slot() }, - value: statuses, - }) + Ok(new_response(&bank, statuses)) } fn get_transaction_status(