From 8f51b84e70f4bd32dc4f0b2adfefb38e1def8e73 Mon Sep 17 00:00:00 2001 From: Marius van der Wijden Date: Mon, 20 Mar 2023 09:57:12 +0100 Subject: [PATCH] core/txpool: correctly overdraft transaction 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 --- core/txpool/txpool2_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/txpool/txpool2_test.go b/core/txpool/txpool2_test.go index 6d84975d83f9..fea94a122bcd 100644 --- a/core/txpool/txpool2_test.go +++ b/core/txpool/txpool2_test.go @@ -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)