File tree Expand file tree Collapse file tree 2 files changed +3
-4
lines changed
tests/osaka/eip7934_block_rlp_limit Expand file tree Collapse file tree 2 files changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ def post() -> Alloc:
19
19
20
20
@pytest .fixture
21
21
def env () -> Environment :
22
+ """Environment fixture with a specified gas limit."""
22
23
return Environment (gas_limit = 100_000_000 )
23
24
24
25
Original file line number Diff line number Diff line change @@ -57,7 +57,7 @@ def block_errors() -> List[BlockException]:
57
57
58
58
def create_test_header (gas_used : int ) -> FixtureHeader :
59
59
"""Create a standard test header for RLP size calculations."""
60
- return FixtureHeader (
60
+ return FixtureHeader ( # type: ignore
61
61
difficulty = "0x0" ,
62
62
number = "0x1" ,
63
63
gas_limit = hex (BLOCK_GAS_LIMIT ),
@@ -85,11 +85,9 @@ def create_test_header(gas_used: int) -> FixtureHeader:
85
85
def get_block_rlp_size (transactions : List [Transaction ], gas_used : int ) -> int :
86
86
"""Calculate the RLP size of a block with given transactions."""
87
87
header = create_test_header (gas_used )
88
-
89
88
total_gas = sum ((tx .gas_limit or 21000 ) for tx in transactions )
90
89
header .gas_used = ZeroPaddedHexNumber (total_gas )
91
-
92
- test_block = FixtureBlockBase (blockHeader = header , withdrawals = [])
90
+ test_block = FixtureBlockBase (blockHeader = header , withdrawals = []) # type: ignore
93
91
return len (test_block .with_rlp (txs = transactions ).rlp )
94
92
95
93
You can’t perform that action at this time.
0 commit comments