Skip to content

Commit

Permalink
Merge pull request #2222 from CortexFoundation/dev
Browse files Browse the repository at this point in the history
remove useless transaction local checking
  • Loading branch information
ucwong authored Dec 10, 2024
2 parents 80fa087 + e203a26 commit 67a7460
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/txpool/txpool.go
Original file line number Diff line number Diff line change
Expand Up @@ -605,7 +605,7 @@ 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, local bool) error {
func (pool *TxPool) validateTx(tx *types.Transaction) error {
// Signature has been checked already, this cannot error.
from, _ := types.Sender(pool.signer, tx)
// Ensure the transaction adheres to nonce ordering
Expand Down Expand Up @@ -654,7 +654,7 @@ func (pool *TxPool) add(tx *types.Transaction, local bool) (replaced bool, err e
isLocal := local || pool.locals.containsTx(tx)

// If the transaction fails basic validation, discard it
if err := pool.validateTx(tx, isLocal); err != nil {
if err := pool.validateTx(tx); err != nil {
log.Trace("Discarding invalid transaction", "hash", hash, "err", err)
invalidTxMeter.Mark(1)
return false, err
Expand Down

0 comments on commit 67a7460

Please sign in to comment.