core/txpool/legacypool: respect nolocals-setting (#2037)

This commit is contained in:
buddho 2023-12-06 17:05:13 +08:00 committed by GitHub
parent aa15df2814
commit a30beeba59
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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))