Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions crates/rpc/rpc-eth-api/src/helpers/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -323,9 +323,10 @@ pub trait LoadState:
.unwrap_or_default();

if block_id == Some(BlockId::pending()) {
// for pending tag we need to find the highest nonce in the pool
if let Some(highest_pool_tx) =
this.pool().get_highest_transaction_by_sender(address)
// for pending tag we need to find the highest nonce of txn in the pending state.
if let Some(highest_pool_tx) = this
.pool()
.get_highest_consecutive_transaction_by_sender(address, on_chain_account_nonce)
{
{
// and the corresponding txcount is nonce + 1 of the highest tx in the pool
Expand Down
Loading