Skip to content

Commit

Permalink
Merge branch '1mgas-txpool-add-parallel' into 1mgas-txpool-profiling
Browse files Browse the repository at this point in the history
  • Loading branch information
andyzhang2023 committed Mar 21, 2024
2 parents 770344d + 549bfed commit 8021765
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion core/txpool/legacypool/legacypool.go
Original file line number Diff line number Diff line change
Expand Up @@ -758,7 +758,14 @@ func (pool *LegacyPool) validateTx(tx *types.Transaction, local bool) error {
}
return nil
},
L1CostFn: pool.l1CostFn,
L1CostFn: func(dataGas types.RollupGasData) *big.Int {
pool.mu.Lock()
defer pool.mu.Unlock()
if pool.l1CostFn != nil {
return pool.l1CostFn(dataGas)
}
return nil
},
}
if err := txpool.ValidateTransactionWithState(tx, pool.signer, opts); err != nil {
return err
Expand Down

0 comments on commit 8021765

Please sign in to comment.