mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-26 22:56:43 +00:00
added RLock on pool.pendingMu in validateTxBasics() (#1001)
This commit is contained in:
parent
1f9c6bb045
commit
8f6bb5c248
1 changed files with 3 additions and 0 deletions
|
|
@ -825,6 +825,9 @@ func (pool *TxPool) validateTxBasics(tx *types.Transaction, local bool) error {
|
|||
// return core.ErrInsufficientFunds
|
||||
// }
|
||||
// Verify that replacing transactions will not result in overdraft
|
||||
pool.pendingMu.RLock()
|
||||
defer pool.pendingMu.RUnlock()
|
||||
|
||||
list := pool.pending[from]
|
||||
if list != nil { // Sender already has pending txs
|
||||
sum := new(big.Int).Add(tx.Cost(), list.totalcost)
|
||||
|
|
|
|||
Loading…
Reference in a new issue