Pool cost (#373)

* save

* save
This commit is contained in:
Alex Sharov 2022-03-18 03:16:57 +07:00 committed by GitHub
parent 2193d570a6
commit e8e8e2f2e6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -685,7 +685,7 @@ func (p *TxPool) validateTx(txn *TxSlot, isLocal bool, stateCache kvcache.CacheV
} }
// Transactor should have enough funds to cover the costs // Transactor should have enough funds to cover the costs
total := uint256.NewInt(txn.gas) total := uint256.NewInt(txn.gas)
total.Mul(total, uint256.NewInt(txn.tip)) total.Mul(total, uint256.NewInt(txn.feeCap))
total.Add(total, &txn.value) total.Add(total, &txn.value)
if senderBalance.Cmp(total) < 0 { if senderBalance.Cmp(total) < 0 {
if txn.traced { if txn.traced {

View File

@ -176,8 +176,8 @@ func TestNonceFromAddress(t *testing.T) {
{ {
var txSlots TxSlots var txSlots TxSlots
txSlot1 := &TxSlot{ txSlot1 := &TxSlot{
tip: 9 * common.Ether, tip: 300000,
feeCap: 300000, feeCap: 9 * common.Ether,
gas: 100000, gas: 100000,
nonce: 3, nonce: 3,
} }