Skip to content

Commit

Permalink
Fix conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
Tyera Eulberg committed Nov 16, 2022
1 parent 898565c commit dba9c59
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 46 deletions.
10 changes: 0 additions & 10 deletions client/src/nonblocking/rpc_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -4505,17 +4504,8 @@ impl RpcClient {
account_config,
..config
};
let accounts: Vec<RpcKeyedAccount> = 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::<OptionalContext<Vec<RpcKeyedAccount>>>(
>>>>>>> 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]),
)
Expand Down
23 changes: 0 additions & 23 deletions client/src/rpc_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down Expand Up @@ -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
}
13 changes: 0 additions & 13 deletions rpc/src/rpc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -124,19 +124,6 @@ fn new_response<T>(bank: &Bank, value: T) -> RpcResponse<T> {
}
}

<<<<<<< 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<T> {
Context(RpcResponse<T>),
NoContext(T),
}

=======
>>>>>>> b18ef88c4 (Fix client get_program_accounts_with_config calls with context (#28772))
fn is_finalized(
block_commitment_cache: &BlockCommitmentCache,
bank: &Bank,
Expand Down

0 comments on commit dba9c59

Please sign in to comment.