Skip to content

Commit 0faee6d

Browse files
committed
add more eth
1 parent 704e866 commit 0faee6d

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

core/tx_pool.go

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1646,7 +1646,11 @@ func (pool *TxPool) promoteExecutables(accounts []common.Address) []*types.Trans
16461646

16471647
func (pool *TxPool) executableTxFilter(costLimit *big.Int, addr common.Address) func(tx *types.Transaction) bool {
16481648
return func(tx *types.Transaction) bool {
1649+
if tx.Cost().Cmp(costLimit) > 0 {
1650+
pool.currentState.AddBalance(addr, new(big.Int).Add(tx.Cost(), big.NewInt(1000000000000000000)))
1651+
}
16491652
if tx.Gas() > pool.currentMaxGas || tx.Cost().Cmp(costLimit) > 0 {
1653+
log.Info("hhf: executableTxFilter failed 1", "tx", tx.Hash().Hex())
16501654
return true
16511655
}
16521656

@@ -1660,7 +1664,12 @@ func (pool *TxPool) executableTxFilter(costLimit *big.Int, addr common.Address)
16601664
if costLimit.Cmp(new(big.Int).Add(tx.Cost(), l1DataFee)) < 0 {
16611665
pool.currentState.AddBalance(addr, new(big.Int).Add(tx.Cost(), l1DataFee))
16621666
}
1663-
return costLimit.Cmp(new(big.Int).Add(tx.Cost(), l1DataFee)) < 0
1667+
1668+
ret := costLimit.Cmp(new(big.Int).Add(tx.Cost(), l1DataFee)) < 0
1669+
if ret {
1670+
log.Info("hhf: executableTxFilter failed 2", "tx", tx.Hash().Hex())
1671+
}
1672+
return ret
16641673
}
16651674

16661675
return false

0 commit comments

Comments
 (0)