From 1e3c8e75a6827959e49677ce529452ac8af38b92 Mon Sep 17 00:00:00 2001 From: Jordan Oroshiba Date: Mon, 10 Mar 2025 14:40:30 -0700 Subject: [PATCH] change deposit tx type key --- core/txpool/legacypool/legacypool.go | 16 ++++++++-------- core/txpool/validation.go | 4 +++- core/types/deposit_tx.go | 17 ++++++++--------- core/types/transaction.go | 2 +- grpc/shared/rollupdata_handling.go | 4 ++-- 5 files changed, 22 insertions(+), 21 deletions(-) diff --git a/core/txpool/legacypool/legacypool.go b/core/txpool/legacypool/legacypool.go index ae5e0edcd..5d7c3fa81 100644 --- a/core/txpool/legacypool/legacypool.go +++ b/core/txpool/legacypool/legacypool.go @@ -306,7 +306,7 @@ func (ao *astriaOrdered) clear() { } func (pool *LegacyPool) ValidateTx(tx *types.Transaction) error { - return pool.validateTxBasics(tx, false) + return pool.validateTxBasics(tx, false, false) } func (pool *LegacyPool) SetAstriaOrdered(txs types.Transactions) { @@ -314,7 +314,7 @@ func (pool *LegacyPool) SetAstriaOrdered(txs types.Transactions) { valid := []*types.Transaction{} for idx, tx := range txs { - err := pool.validateTxBasics(tx, false) + err := pool.validateTxBasics(tx, false, true) if err != nil { log.Warn("astria tx failed validation", "index", idx, "hash", tx.Hash(), "error", err) continue @@ -706,16 +706,16 @@ func (pool *LegacyPool) local() map[common.Address]types.Transactions { // rules, but does not check state-dependent validation such as sufficient balance. // This check is meant as an early check which only needs to be performed once, // and does not require the pool mutex to be held. -func (pool *LegacyPool) validateTxBasics(tx *types.Transaction, local bool) error { +func (pool *LegacyPool) validateTxBasics(tx *types.Transaction, local bool, isAstriaOrdered bool) error { opts := &txpool.ValidationOptions{ Config: pool.chainconfig, Accept: 0 | 1<