From 947a5383efdf8f26f00fc4f4ae4a78c7b3a669f1 Mon Sep 17 00:00:00 2001 From: Hadrien Croubois Date: Thu, 7 Mar 2024 14:30:23 +0100 Subject: [PATCH] add delegate tx support in legacypool --- core/txpool/legacypool/legacypool.go | 7 ++-- core/types/transaction_marshalling.go | 55 +++++++++++++++++++++++++++ 2 files changed, 59 insertions(+), 3 deletions(-) diff --git a/core/txpool/legacypool/legacypool.go b/core/txpool/legacypool/legacypool.go index 4e1d26acf4..c7f9282670 100644 --- a/core/txpool/legacypool/legacypool.go +++ b/core/txpool/legacypool/legacypool.go @@ -274,10 +274,10 @@ func New(config Config, chain BlockChain) *LegacyPool { } // Filter returns whether the given transaction can be consumed by the legacy -// pool, specifically, whether it is a Legacy, AccessList or Dynamic transaction. +// pool, specifically, whether it is a Legacy, AccessList, Dynamic or Delegate transaction. func (pool *LegacyPool) Filter(tx *types.Transaction) bool { switch tx.Type() { - case types.LegacyTxType, types.AccessListTxType, types.DynamicFeeTxType: + case types.LegacyTxType, types.AccessListTxType, types.DynamicFeeTxType, types.DelegateTxType: return true default: return false @@ -609,7 +609,8 @@ func (pool *LegacyPool) validateTxBasics(tx *types.Transaction, local bool) erro Accept: 0 | 1<