mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
internal/ethapi: add testcase of pre-london
Signed-off-by: jsvisa <delweng@gmail.com>
This commit is contained in:
parent
1ae784545e
commit
afd421766c
1 changed files with 14 additions and 7 deletions
|
|
@ -67,6 +67,13 @@ func TestSetFeeDefaults(t *testing.T) {
|
||||||
&TransactionArgs{GasPrice: fortytwo},
|
&TransactionArgs{GasPrice: fortytwo},
|
||||||
nil,
|
nil,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"legacy tx pre-London with zero price",
|
||||||
|
false,
|
||||||
|
&TransactionArgs{GasPrice: zero},
|
||||||
|
&TransactionArgs{GasPrice: fortytwo},
|
||||||
|
nil,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"legacy tx post-London, explicit gas price",
|
"legacy tx post-London, explicit gas price",
|
||||||
true,
|
true,
|
||||||
|
|
@ -74,6 +81,13 @@ func TestSetFeeDefaults(t *testing.T) {
|
||||||
&TransactionArgs{GasPrice: fortytwo},
|
&TransactionArgs{GasPrice: fortytwo},
|
||||||
nil,
|
nil,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"legacy tx post-London with zero price",
|
||||||
|
true,
|
||||||
|
&TransactionArgs{GasPrice: zero},
|
||||||
|
nil,
|
||||||
|
errors.New("gasPrice must be positive"),
|
||||||
|
},
|
||||||
|
|
||||||
// Access list txs
|
// Access list txs
|
||||||
{
|
{
|
||||||
|
|
@ -185,13 +199,6 @@ func TestSetFeeDefaults(t *testing.T) {
|
||||||
nil,
|
nil,
|
||||||
errors.New("both gasPrice and (maxFeePerGas or maxPriorityFeePerGas) specified"),
|
errors.New("both gasPrice and (maxFeePerGas or maxPriorityFeePerGas) specified"),
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"set gas price to zero",
|
|
||||||
true,
|
|
||||||
&TransactionArgs{GasPrice: zero},
|
|
||||||
nil,
|
|
||||||
errors.New("gasPrice must be positive"),
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ctx := context.Background()
|
ctx := context.Background()
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue