From 90fad36613f1020d9d86c47e75b79902dea99e30 Mon Sep 17 00:00:00 2001 From: Tyera Eulberg Date: Thu, 3 Sep 2020 11:57:57 -0600 Subject: [PATCH] Use new_response for consistency --- core/src/rpc.rs | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) 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(