Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add testcode for gasPrice is not specified
  • Loading branch information
SangIlMo authored and holiman committed Nov 8, 2024
commit 3e190e95b200665ea6102e3eaedd6c3b54df7d2e
21 changes: 21 additions & 0 deletions ethclient/gethclient/gethclient_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down