BuildOnViction / victionchain

The Efficient Blockchain Powered By Proof Of Stake Voting Consensus
https://viction.xyz
GNU Lesser General Public License v3.0
168 stars 85 forks source link

feat(internal/ethapi/api): Ask transaction pool for the nonce which includes pending transactions #482

Closed imterryyy closed 2 days ago

imterryyy commented 3 days ago

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: https://github.com/ethereum/go-ethereum/pull/15794