diff --git a/lib/client/src/snapshot_source.rs b/lib/client/src/snapshot_source.rs index 991ec730e..22943f066 100644 --- a/lib/client/src/snapshot_source.rs +++ b/lib/client/src/snapshot_source.rs @@ -4,7 +4,8 @@ use serde_json::json; use solana_account_decoder::{UiAccount, UiAccountEncoding}; use solana_client::{ rpc_config::{RpcAccountInfoConfig, RpcContextConfig, RpcProgramAccountsConfig}, - rpc_response::{OptionalContext, Response, RpcKeyedAccount}, rpc_request::RpcRequest, + rpc_request::RpcRequest, + rpc_response::{OptionalContext, Response, RpcKeyedAccount}, }; use solana_rpc::rpc::rpc_minimal::MinimalClient; use solana_sdk::{commitment_config::CommitmentConfig, pubkey::Pubkey}; @@ -78,7 +79,8 @@ async fn feed_snapshots( openbook_oracles: Vec, sender: &async_channel::Sender, ) -> anyhow::Result<()> { - let rpc_client = solana_rpc_client::nonblocking::rpc_client::RpcClient::new(config.rpc_http_url.clone()); + let rpc_client = + solana_rpc_client::nonblocking::rpc_client::RpcClient::new(config.rpc_http_url.clone()); // rpc_client.get_program_accounts_with_config(pubkey, config); // let rpc_client = http::connect::(&config.rpc_http_url) @@ -102,11 +104,12 @@ async fn feed_snapshots( let mut snapshot = AccountSnapshot::default(); // Get all accounts of the openorders program - let response = rpc_client.send::>>( - RpcRequest::GetProgramAccounts, - json!([openbook_v2::id().to_string(), all_accounts_config]), - ) - .await?; + let response = rpc_client + .send::>>( + RpcRequest::GetProgramAccounts, + json!([openbook_v2::id().to_string(), all_accounts_config]), + ) + .await?; if let OptionalContext::Context(account_snapshot_response) = response { snapshot.extend_from_gpa_rpc(account_snapshot_response)?; } else { @@ -127,8 +130,11 @@ async fn feed_snapshots( ( keys, rpc_client - .send(RpcRequest::GetMultipleAccounts, json!([string_keys, account_info_config])) - .await + .send( + RpcRequest::GetMultipleAccounts, + json!([string_keys, account_info_config]), + ) + .await, ) } })