From a30beeba593584851debba1af2e5a7f49d8de70d Mon Sep 17 00:00:00 2001 From: buddho Date: Wed, 6 Dec 2023 17:05:13 +0800 Subject: [PATCH] core/txpool/legacypool: respect nolocals-setting (#2037) --- core/txpool/legacypool/legacypool.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/txpool/legacypool/legacypool.go b/core/txpool/legacypool/legacypool.go index 2c23f142b..42962e4a2 100644 --- a/core/txpool/legacypool/legacypool.go +++ b/core/txpool/legacypool/legacypool.go @@ -1027,6 +1027,9 @@ func (pool *LegacyPool) addRemoteSync(tx *types.Transaction) error { // addTxs attempts to queue a batch of transactions if they are valid. func (pool *LegacyPool) addTxs(txs []*types.Transaction, local, sync bool) []error { + // Do not treat as local if local transactions have been disabled + local = local && !pool.config.NoLocals + // Filter out known ones without obtaining the pool lock or recovering signatures var ( errs = make([]error, len(txs))