add SetCode transaction to txpool

This commit is contained in:
colinlyguo 2024-12-22 02:57:01 +08:00
parent 341647f186
commit b6332ed79a
No known key found for this signature in database
GPG key ID: 82E123BE1B68288B

View file

@ -276,10 +276,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 SetCode 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.SetCodeTxType:
return true
default:
return false