diff --git a/core/tx_pool.go b/core/tx_pool.go index c63ef8127b1a..573ba44f4ece 100644 --- a/core/tx_pool.go +++ b/core/tx_pool.go @@ -499,6 +499,9 @@ func (pool *TxPool) SetGasPrice(price *big.Int) { // Nonce returns the next nonce of an account, with all transactions executable // by the pool already applied on top. func (pool *TxPool) Nonce(addr common.Address) uint64 { + pool.mu.RLock() + defer pool.mu.RUnlock() + return pool.pendingNonces.get(addr) }