From 4b6f1a6fd65e64bcd3bcad5080aff168ee9811f8 Mon Sep 17 00:00:00 2001 From: Jerry Date: Mon, 7 Aug 2023 14:59:40 -0700 Subject: [PATCH] Minor fix --- core/txpool/txpool.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/txpool/txpool.go b/core/txpool/txpool.go index 1d2f1aaa35..9ced7c630d 100644 --- a/core/txpool/txpool.go +++ b/core/txpool/txpool.go @@ -854,6 +854,9 @@ func (pool *TxPool) validateTxBasics(tx *types.Transaction, local bool) error { // validateTx checks whether a transaction is valid according to the consensus // rules and adheres to some heuristic limits of the local node (price and size). func (pool *TxPool) validateTx(tx *types.Transaction, _ bool) error { + pool.currentStateMutex.Lock() + defer pool.currentStateMutex.Unlock() + // Signature has been checked already, this cannot error. from, _ := types.Sender(pool.signer, tx) // Ensure the transaction adheres to nonce ordering