Skip to content

Commit

Permalink
core/txpool: correctly overdraft transaction
Browse files Browse the repository at this point in the history
This commit changes a very subtle issue in the test, where the transactions
did not actually overdraft the sender. The issue was not found previously,
because the future rule was too strict
  • Loading branch information
MariusVanDerWijden committed Mar 29, 2023
1 parent 8110738 commit 8f51b84
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/txpool/txpool2_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ func TestTransactionZAttack(t *testing.T) {
key, _ := crypto.GenerateKey()
pool.currentState.AddBalance(crypto.PubkeyToAddress(key.PublicKey), big.NewInt(100000000000))
for j := 0; j < int(pool.config.GlobalSlots); j++ {
overDraftTxs = append(overDraftTxs, pricedValuedTransaction(uint64(j), 60000000000, 21000, big.NewInt(500), key))
overDraftTxs = append(overDraftTxs, pricedValuedTransaction(uint64(j), 600000000000, 21000, big.NewInt(500), key))
}
}
pool.AddRemotesSync(overDraftTxs)
Expand Down

0 comments on commit 8f51b84

Please sign in to comment.