From 01fa6d99c5299cc5331cf3a0abef0266b11fa718 Mon Sep 17 00:00:00 2001 From: Juan Palacios Date: Mon, 13 Nov 2023 10:29:53 +1100 Subject: [PATCH] Added missing checks to test --- core/txpool/legacypool/legacypool_test.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/core/txpool/legacypool/legacypool_test.go b/core/txpool/legacypool/legacypool_test.go index a3d5cb5ac1..fed3ba0225 100644 --- a/core/txpool/legacypool/legacypool_test.go +++ b/core/txpool/legacypool/legacypool_test.go @@ -1515,12 +1515,20 @@ func TestMinGasPriceEnforced(t *testing.T) { t.Fatalf("Min tip not enforced") } + if err := pool.Add([]*txpool.Transaction{{Tx: tx}}, true, false)[0]; !errors.Is(err, txpool.ErrUnderpriced) { + t.Fatalf("Min tip not enforced") + } + tx = dynamicFeeTx(0, 100000, big.NewInt(3), big.NewInt(2), key) pool.SetGasTip(big.NewInt(tx.GasTipCap().Int64() + 1)) if err := pool.addLocal(tx); !errors.Is(err, txpool.ErrUnderpriced) { t.Fatalf("Min tip not enforced") } + + if err := pool.Add([]*txpool.Transaction{{Tx: tx}}, true, false)[0]; !errors.Is(err, txpool.ErrUnderpriced) { + t.Fatalf("Min tip not enforced") + } } // Tests that setting the transaction pool gas price to a higher value correctly