Skip to content

Commit bc4fc4a

Browse files
ethapi: update gas used values in simulation tests for accuracy
1 parent 214ce03 commit bc4fc4a

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

internal/ethapi/api_test.go

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -817,7 +817,7 @@ func TestCall(t *testing.T) {
817817
Balance: big.NewInt(params.Ether),
818818
Nonce: 1,
819819
Storage: map[common.Hash]common.Hash{
820-
common.Hash{}: common.HexToHash("0x0000000000000000000000000000000000000000000000000000000000000001"),
820+
{}: common.HexToHash("0x0000000000000000000000000000000000000000000000000000000000000001"),
821821
},
822822
},
823823
},
@@ -1582,17 +1582,17 @@ func TestSimulateV1(t *testing.T) {
15821582
want: []blockRes{{
15831583
Number: "0xb",
15841584
GasLimit: "0x47e7c4",
1585-
GasUsed: "0xa58c",
1585+
GasUsed: "0xa6cc",
15861586
Miner: coinbase,
15871587
BaseFeePerGas: "0x0",
15881588
Calls: []callRes{{
15891589
ReturnValue: "0xec4916dd28fc4c10d78e287ca5d9cc51ee1ae73cbfde08c6b37324cbfaac8bc5",
1590-
GasUsed: "0x52dc",
1590+
GasUsed: "0x5366",
15911591
Logs: []log{},
15921592
Status: "0x1",
15931593
}, {
15941594
ReturnValue: "0x0000000000000000000000000000000000000000000000000000000000000001",
1595-
GasUsed: "0x52b0",
1595+
GasUsed: "0x5366",
15961596
Logs: []log{},
15971597
Status: "0x1",
15981598
}},
@@ -1935,22 +1935,22 @@ func TestSimulateV1(t *testing.T) {
19351935
}, {
19361936
Number: "0xc",
19371937
GasLimit: "0x47e7c4",
1938-
GasUsed: "0xf864",
1938+
GasUsed: "0xfa32",
19391939
Miner: coinbase,
19401940
BaseFeePerGas: "0x0",
19411941
Calls: []callRes{{
19421942
ReturnValue: "0x",
1943-
GasUsed: "0x52cc",
1943+
GasUsed: "0x5366",
19441944
Logs: []log{},
19451945
Status: "0x1",
19461946
}, {
19471947
ReturnValue: "0x",
1948-
GasUsed: "0x52cc",
1948+
GasUsed: "0x5366",
19491949
Logs: []log{},
19501950
Status: "0x1",
19511951
}, {
19521952
ReturnValue: "0x",
1953-
GasUsed: "0x52cc",
1953+
GasUsed: "0x5366",
19541954
Logs: []log{},
19551955
Status: "0x1",
19561956
}},
@@ -1978,17 +1978,17 @@ func TestSimulateV1(t *testing.T) {
19781978
}, {
19791979
Number: "0x10",
19801980
GasLimit: "0x47e7c4",
1981-
GasUsed: "0xa598",
1981+
GasUsed: "0xa6cc",
19821982
Miner: coinbase,
19831983
BaseFeePerGas: "0x0",
19841984
Calls: []callRes{{
19851985
ReturnValue: "0x",
1986-
GasUsed: "0x52cc",
1986+
GasUsed: "0x5366",
19871987
Logs: []log{},
19881988
Status: "0x1",
19891989
}, {
19901990
ReturnValue: "0x",
1991-
GasUsed: "0x52cc",
1991+
GasUsed: "0x5366",
19921992
Logs: []log{},
19931993
Status: "0x1",
19941994
}},

0 commit comments

Comments
 (0)