From dba9c595fd1426f3f58dca2e09eccfe3d1abb054 Mon Sep 17 00:00:00 2001 From: Tyera Eulberg Date: Wed, 16 Nov 2022 15:01:03 -0700 Subject: [PATCH] Fix conflicts --- client/src/nonblocking/rpc_client.rs | 10 ---------- client/src/rpc_client.rs | 23 ----------------------- rpc/src/rpc.rs | 13 ------------- 3 files changed, 46 deletions(-) diff --git a/client/src/nonblocking/rpc_client.rs b/client/src/nonblocking/rpc_client.rs index 6e42de803e6f62..2d300be0b7822a 100644 --- a/client/src/nonblocking/rpc_client.rs +++ b/client/src/nonblocking/rpc_client.rs @@ -4496,7 +4496,6 @@ impl RpcClient { .commitment .unwrap_or_else(|| self.commitment()); let commitment = self.maybe_map_commitment(commitment).await?; -<<<<<<< HEAD:client/src/nonblocking/rpc_client.rs let account_config = RpcAccountInfoConfig { commitment: Some(commitment), ..config.account_config @@ -4505,17 +4504,8 @@ impl RpcClient { account_config, ..config }; - let accounts: Vec = self - .send( -======= - config.account_config.commitment = Some(commitment); - if let Some(filters) = config.filters { - config.filters = Some(self.maybe_map_filters(filters).await?); - } - let accounts = self .send::>>( ->>>>>>> b18ef88c4 (Fix client get_program_accounts_with_config calls with context (#28772)):rpc-client/src/nonblocking/rpc_client.rs RpcRequest::GetProgramAccounts, json!([pubkey.to_string(), config]), ) diff --git a/client/src/rpc_client.rs b/client/src/rpc_client.rs index f3b712db9e7638..564494aa809908 100644 --- a/client/src/rpc_client.rs +++ b/client/src/rpc_client.rs @@ -4317,28 +4317,6 @@ mod tests { let is_err = rpc_client.get_latest_blockhash().is_err(); assert!(is_err); } -<<<<<<< HEAD:client/src/rpc_client.rs -======= - - #[test] - fn test_get_stake_minimum_delegation() { - let expected_minimum_delegation: u64 = 123_456_789; - let rpc_client = RpcClient::new_mock("succeeds".to_string()); - - // Test: without commitment - { - let actual_minimum_delegation = rpc_client.get_stake_minimum_delegation().unwrap(); - assert_eq!(expected_minimum_delegation, actual_minimum_delegation); - } - - // Test: with commitment - { - let actual_minimum_delegation = rpc_client - .get_stake_minimum_delegation_with_commitment(CommitmentConfig::confirmed()) - .unwrap(); - assert_eq!(expected_minimum_delegation, actual_minimum_delegation); - } - } #[test] fn test_get_program_accounts_with_config() { @@ -4418,5 +4396,4 @@ mod tests { assert_eq!(expected_result, result); } } ->>>>>>> b18ef88c4 (Fix client get_program_accounts_with_config calls with context (#28772)):rpc-client/src/rpc_client.rs } diff --git a/rpc/src/rpc.rs b/rpc/src/rpc.rs index f02b168ba8ead1..930303a869c4be 100644 --- a/rpc/src/rpc.rs +++ b/rpc/src/rpc.rs @@ -124,19 +124,6 @@ fn new_response(bank: &Bank, value: T) -> RpcResponse { } } -<<<<<<< HEAD -/// Wrapper for rpc return types of methods that provide responses both with and without context. -/// Main purpose of this is to fix methods that lack context information in their return type, -/// without breaking backwards compatibility. -#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] -#[serde(untagged)] -pub enum OptionalContext { - Context(RpcResponse), - NoContext(T), -} - -======= ->>>>>>> b18ef88c4 (Fix client get_program_accounts_with_config calls with context (#28772)) fn is_finalized( block_commitment_cache: &BlockCommitmentCache, bank: &Bank,