mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-18 18:02:24 +00:00
Add testcode for gasPrice is not specified
This commit is contained in:
parent
1280d75987
commit
3e190e95b2
1 changed files with 21 additions and 0 deletions
|
|
@ -237,6 +237,27 @@ func testAccessList(t *testing.T, client *rpc.Client) {
|
|||
if al != nil {
|
||||
t.Fatalf("unexpected accesslist: %v", len(*al))
|
||||
}
|
||||
|
||||
// when gasPrice is not specified
|
||||
msg = ethereum.CallMsg{
|
||||
From: testAddr,
|
||||
To: &common.Address{},
|
||||
Gas: 21000,
|
||||
Value: big.NewInt(1),
|
||||
}
|
||||
al, gas, vmErr, err = ec.CreateAccessList(context.Background(), msg)
|
||||
if err != nil {
|
||||
t.Fatalf("unexpected error: %v", err)
|
||||
}
|
||||
if vmErr != "" {
|
||||
t.Fatalf("unexpected vm error: %v", vmErr)
|
||||
}
|
||||
if gas != 21000 {
|
||||
t.Fatalf("unexpected gas used: %v", gas)
|
||||
}
|
||||
if len(*al) != 0 {
|
||||
t.Fatalf("unexpected length of accesslist: %v", len(*al))
|
||||
}
|
||||
}
|
||||
|
||||
func testGetProof(t *testing.T, client *rpc.Client, addr common.Address) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue