core/txpool/legacypool: fix non-determinism in test

This commit is contained in:
Martin Holst Swende 2024-12-12 15:40:01 +01:00
parent 581264d6b9
commit 4e0edac2ef
No known key found for this signature in database
GPG Key ID: 683B438C05A5DDF0
1 changed files with 1 additions and 1 deletions

View File

@ -1597,7 +1597,7 @@ func TestUnderpricing(t *testing.T) {
t.Fatalf("adding underpriced pending transaction error mismatch: have %v, want %v", err, txpool.ErrUnderpriced)
}
// Replace a future transaction with a future transaction
if err := pool.addRemoteSync(pricedTransaction(1, 100000, big.NewInt(2), keys[1])); err != nil { // +K1:1 => -K1:1 => Pend K0:0, K0:1, K2:0; Que K1:1
if err := pool.addRemoteSync(pricedTransaction(1, 100000, big.NewInt(5), keys[1])); err != nil { // +K1:1 => -K1:1 => Pend K0:0, K0:1, K2:0; Que K1:1
t.Fatalf("failed to add well priced transaction: %v", err)
}
// Ensure that adding high priced transactions drops cheap ones, but not own