Skip to content

internal/ethapi/api: Ask transaction pool for the nonce which includes pending transactions#484

Merged
tungng98 merged 1 commit intoBuildOnViction:pre-releasefrom
imterryyy:fix/tx-pool-nonce
Jan 7, 2025
Merged

internal/ethapi/api: Ask transaction pool for the nonce which includes pending transactions#484
tungng98 merged 1 commit intoBuildOnViction:pre-releasefrom
imterryyy:fix/tx-pool-nonce

Conversation

@imterryyy
Copy link
Copy Markdown
Collaborator

Currently, GetTransactionCount uses StateAndHeaderByNumber to get the nonce from the pending state. But, only the miner knows the pending state so if the local node is not a miner, then the state used to get the nonce will not include any pending transactions that the sender has submitted.

It seems that GetTransactionCount should ask the local node's transaction pool for the nonce if we want the pending nonce to include pending transactions.

Mirror: ethereum/go-ethereum#15794

@tungng98 tungng98 changed the base branch from master to pre-release January 7, 2025 03:55
@tungng98 tungng98 changed the title feat(internal/ethapi/api): Ask transaction pool for the nonce which includes pending transactions internal/ethapi/api: Ask transaction pool for the nonce which includes pending transactions Jan 7, 2025
@tungng98 tungng98 merged commit 926bb45 into BuildOnViction:pre-release Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants