Skip to content

Commit

Permalink
chore: remove sn nonce (#1461)
Browse files Browse the repository at this point in the history
remove sn nonce
  • Loading branch information
greged93 authored Oct 15, 2024
1 parent cec9f0e commit 1c54ea7
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions src/providers/eth_provider/transactions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,18 +93,6 @@ where
}
let nonce = maybe_nonce.map_err(ExecutionError::from)?.nonce;

// Get the protocol nonce as well, in edge cases where the protocol nonce is higher than the account nonce.
// This can happen when an underlying Starknet transaction reverts => Account storage changes are reverted,
// but the protocol nonce is still incremented.
let span = tracing::span!(tracing::Level::INFO, "sn::protocol_nonce");
let protocol_nonce = self
.starknet_provider_inner()
.get_nonce(starknet_block_id, address)
.instrument(span)
.await
.unwrap_or_default();
let nonce = nonce.max(protocol_nonce);

Ok(into_via_wrapper!(nonce))
}
}

0 comments on commit 1c54ea7

Please sign in to comment.