chore: cargo +nightly clippy --fix -Z unstable-options
This commit is contained in:
committed by
Michael Vines
parent
3570b00560
commit
6514096a67
@@ -1627,7 +1627,7 @@ impl RpcClient {
|
||||
) -> ClientResult<u64> {
|
||||
let now = Instant::now();
|
||||
loop {
|
||||
match self.get_balance_with_commitment(&pubkey, commitment_config) {
|
||||
match self.get_balance_with_commitment(pubkey, commitment_config) {
|
||||
Ok(bal) => {
|
||||
return Ok(bal.value);
|
||||
}
|
||||
@@ -1696,7 +1696,7 @@ impl RpcClient {
|
||||
let now = Instant::now();
|
||||
loop {
|
||||
if let Ok(Some(_)) =
|
||||
self.get_signature_status_with_commitment(&signature, commitment_config)
|
||||
self.get_signature_status_with_commitment(signature, commitment_config)
|
||||
{
|
||||
break;
|
||||
}
|
||||
@@ -1853,11 +1853,11 @@ impl RpcClient {
|
||||
let (signature, status) = loop {
|
||||
// Get recent commitment in order to count confirmations for successful transactions
|
||||
let status = self
|
||||
.get_signature_status_with_commitment(&signature, CommitmentConfig::processed())?;
|
||||
.get_signature_status_with_commitment(signature, CommitmentConfig::processed())?;
|
||||
if status.is_none() {
|
||||
if self
|
||||
.get_fee_calculator_for_blockhash_with_commitment(
|
||||
&recent_blockhash,
|
||||
recent_blockhash,
|
||||
CommitmentConfig::processed(),
|
||||
)?
|
||||
.value
|
||||
@@ -1891,7 +1891,7 @@ impl RpcClient {
|
||||
// Return when specified commitment is reached
|
||||
// Failed transactions have already been eliminated, `is_some` check is sufficient
|
||||
if self
|
||||
.get_signature_status_with_commitment(&signature, commitment)?
|
||||
.get_signature_status_with_commitment(signature, commitment)?
|
||||
.is_some()
|
||||
{
|
||||
progress_bar.set_message("Transaction confirmed");
|
||||
@@ -1907,7 +1907,7 @@ impl RpcClient {
|
||||
));
|
||||
sleep(Duration::from_millis(500));
|
||||
confirmations = self
|
||||
.get_num_blocks_since_signature_confirmation(&signature)
|
||||
.get_num_blocks_since_signature_confirmation(signature)
|
||||
.unwrap_or(confirmations);
|
||||
if now.elapsed().as_secs() >= MAX_HASH_AGE_IN_SECONDS as u64 {
|
||||
return Err(
|
||||
|
Reference in New Issue
Block a user