diff --git a/txpool/txpool_test.go b/txpool/txpool_test.go index 87c02b96f1..2cf7e354fc 100644 --- a/txpool/txpool_test.go +++ b/txpool/txpool_test.go @@ -34,6 +34,7 @@ var ( forks = &chain.Forks{ Homestead: chain.NewFork(0), Istanbul: chain.NewFork(0), + London: chain.NewFork(0), } ) @@ -1835,6 +1836,22 @@ func TestPermissionSmartContractDeployment(t *testing.T) { ErrTipAboveFeeCap, ) }) + + t.Run("dynamic fee tx placed without eip-1559 fork enabled", func(t *testing.T) { + t.Parallel() + pool := setupPool() + pool.forks.London = false + + tx := newTx(defaultAddr, 0, 1) + tx.Type = types.DynamicFeeTx + tx.GasFeeCap = big.NewInt(10000) + tx.GasTipCap = big.NewInt(100000) + + assert.ErrorIs(t, + pool.addTx(local, signTx(tx)), + ErrInvalidTxType, + ) + }) } /* "Integrated" tests */