Skip to content

Commit 9d8f63a

Browse files
authored
Add non-0 block gas limit. (#244)
1 parent 25a9c9d commit 9d8f63a

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

frame/ethereum/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ impl<T: Config> Module<T> {
298298
frame_system::Module::<T>::block_number()
299299
)
300300
),
301-
gas_limit: U256::zero(), // TODO: set this using Ethereum's gas limit change algorithm.
301+
gas_limit: U256::from(u32::max_value()), // TODO: set this using Ethereum's gas limit change algorithm.
302302
gas_used: receipts.clone().into_iter().fold(U256::zero(), |acc, r| acc + r.used_gas),
303303
timestamp: UniqueSaturatedInto::<u64>::unique_saturated_into(
304304
pallet_timestamp::Module::<T>::get()

ts-tests/tests/test-block.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,14 @@ describeWithFrontier("Frontier RPC (Block)", `simple-specs.json`, (context) => {
2121
author: "0x0000000000000000000000000000000000000000",
2222
difficulty: "0",
2323
extraData: "0x",
24-
gasLimit: 0,
24+
gasLimit: 4294967295,
2525
gasUsed: 0,
2626
logsBloom:
2727
"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
2828
miner: "0x0000000000000000000000000000000000000000",
2929
number: 0,
3030
receiptsRoot: "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
31-
size: 501,
31+
size: 505,
3232
timestamp: 0,
3333
totalDifficulty: null,
3434
});
@@ -77,7 +77,7 @@ describeWithFrontier("Frontier RPC (Block)", `simple-specs.json`, (context) => {
7777
author: "0x0000000000000000000000000000000000000000",
7878
difficulty: "0",
7979
extraData: "0x",
80-
gasLimit: 0,
80+
gasLimit: 4294967295,
8181
gasUsed: 0,
8282
//hash: "0x14fe6f7c93597f79b901f8b5d7a84277a90915b8d355959b587e18de34f1dc17",
8383
logsBloom:
@@ -86,7 +86,7 @@ describeWithFrontier("Frontier RPC (Block)", `simple-specs.json`, (context) => {
8686
number: 1,
8787
//parentHash: "0x04540257811b46d103d9896e7807040e7de5080e285841c5430d1a81588a0ce4",
8888
receiptsRoot: "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
89-
size: 503,
89+
size: 507,
9090
timestamp: 6,
9191
totalDifficulty: null,
9292
//transactions: [],

0 commit comments

Comments
 (0)