@@ -1411,34 +1411,34 @@ func TestTransactionReplacement(t *testing.T) {
14111411 if err := pool .AddRemote (pricedTransaction (0 , big .NewInt (100000 ), big .NewInt (price ), key )); err != nil {
14121412 t .Fatalf ("failed to add original proper pending transaction: %v" , err )
14131413 }
1414- if err := pool .AddRemote (pricedTransaction (0 , big .NewInt (100000 ), big .NewInt (threshold ), key )); err != ErrReplaceUnderpriced {
1414+ if err := pool .AddRemote (pricedTransaction (0 , big .NewInt (100001 ), big .NewInt (threshold - 1 ), key )); err != ErrReplaceUnderpriced {
14151415 t .Fatalf ("original proper pending transaction replacement error mismatch: have %v, want %v" , err , ErrReplaceUnderpriced )
14161416 }
1417- if err := pool .AddRemote (pricedTransaction (0 , big .NewInt (100000 ), big .NewInt (threshold + 1 ), key )); err != nil {
1417+ if err := pool .AddRemote (pricedTransaction (0 , big .NewInt (100000 ), big .NewInt (threshold ), key )); err != nil {
14181418 t .Fatalf ("failed to replace original proper pending transaction: %v" , err )
14191419 }
14201420 if err := validateEvents (events , 2 ); err != nil {
14211421 t .Fatalf ("proper replacement event firing failed: %v" , err )
14221422 }
14231423 // Add queued transactions, ensuring the minimum price bump is enforced for replacement (for ultra low prices too)
14241424 if err := pool .AddRemote (pricedTransaction (2 , big .NewInt (100000 ), big .NewInt (1 ), key )); err != nil {
1425- t .Fatalf ("failed to add original queued transaction: %v" , err )
1425+ t .Fatalf ("failed to add original cheap queued transaction: %v" , err )
14261426 }
14271427 if err := pool .AddRemote (pricedTransaction (2 , big .NewInt (100001 ), big .NewInt (1 ), key )); err != ErrReplaceUnderpriced {
1428- t .Fatalf ("original queued transaction replacement error mismatch: have %v, want %v" , err , ErrReplaceUnderpriced )
1428+ t .Fatalf ("original cheap queued transaction replacement error mismatch: have %v, want %v" , err , ErrReplaceUnderpriced )
14291429 }
14301430 if err := pool .AddRemote (pricedTransaction (2 , big .NewInt (100000 ), big .NewInt (2 ), key )); err != nil {
1431- t .Fatalf ("failed to replace original queued transaction: %v" , err )
1431+ t .Fatalf ("failed to replace original cheap queued transaction: %v" , err )
14321432 }
14331433
14341434 if err := pool .AddRemote (pricedTransaction (2 , big .NewInt (100000 ), big .NewInt (price ), key )); err != nil {
1435- t .Fatalf ("failed to add original queued transaction: %v" , err )
1435+ t .Fatalf ("failed to add original proper queued transaction: %v" , err )
14361436 }
1437- if err := pool .AddRemote (pricedTransaction (2 , big .NewInt (100001 ), big .NewInt (threshold ), key )); err != ErrReplaceUnderpriced {
1438- t .Fatalf ("original queued transaction replacement error mismatch: have %v, want %v" , err , ErrReplaceUnderpriced )
1437+ if err := pool .AddRemote (pricedTransaction (2 , big .NewInt (100001 ), big .NewInt (threshold - 1 ), key )); err != ErrReplaceUnderpriced {
1438+ t .Fatalf ("original proper queued transaction replacement error mismatch: have %v, want %v" , err , ErrReplaceUnderpriced )
14391439 }
1440- if err := pool .AddRemote (pricedTransaction (2 , big .NewInt (100000 ), big .NewInt (threshold + 1 ), key )); err != nil {
1441- t .Fatalf ("failed to replace original queued transaction: %v" , err )
1440+ if err := pool .AddRemote (pricedTransaction (2 , big .NewInt (100000 ), big .NewInt (threshold ), key )); err != nil {
1441+ t .Fatalf ("failed to replace original proper queued transaction: %v" , err )
14421442 }
14431443
14441444 if err := validateEvents (events , 0 ); err != nil {
0 commit comments