core/txpool/legacypool: extend test

This commit is contained in:
Marius van der Wijden 2023-11-15 13:49:31 +01:00
parent 5927f62b76
commit 0dc44d0a34

View file

@ -1529,6 +1529,11 @@ func TestMinGasPriceEnforced(t *testing.T) {
if err := pool.Add([]*types.Transaction{tx}, true, false)[0]; !errors.Is(err, txpool.ErrUnderpriced) {
t.Fatalf("Min tip not enforced")
}
// Make sure the tx is accepted if locals are enabled
pool.config.NoLocals = false
if err := pool.Add([]*types.Transaction{tx}, true, false)[0]; err != nil {
t.Fatalf("Min tip enforced with locals enabled, error: %v", err)
}
}
// Tests that setting the transaction pool gas price to a higher value correctly