From 0980a5b3e592de130ea2541ee9394229630c16c4 Mon Sep 17 00:00:00 2001 From: Arpit Temani Date: Thu, 30 Nov 2023 15:35:46 +0530 Subject: [PATCH] allow unprotected txns --- core/txpool/legacypool/legacypool.go | 16 +++++++++++-- core/txpool/validation.go | 4 +++- core/types/transaction_signing.go | 35 ++++++++++++++++++++++++++++ eth/backend.go | 2 -- 4 files changed, 52 insertions(+), 5 deletions(-) diff --git a/core/txpool/legacypool/legacypool.go b/core/txpool/legacypool/legacypool.go index bf179fe996..6a3005e5a1 100644 --- a/core/txpool/legacypool/legacypool.go +++ b/core/txpool/legacypool/legacypool.go @@ -155,7 +155,8 @@ var DefaultConfig = Config{ AccountQueue: 64, GlobalQueue: 1024, - Lifetime: 3 * time.Hour, + Lifetime: 3 * time.Hour, + AllowUnprotectedTxs: false, } // sanitize checks the provided user configurations and changes anything that's @@ -601,7 +602,8 @@ func (pool *LegacyPool) local() map[common.Address]types.Transactions { // and does not require the pool mutex to be held. func (pool *LegacyPool) validateTxBasics(tx *types.Transaction, local bool) error { opts := &txpool.ValidationOptions{ - Config: pool.chainconfig, + Config: pool.chainconfig, + AllowUnprotectedTxs: pool.config.AllowUnprotectedTxs, Accept: 0 | 1<