Skip to content

Commit

Permalink
chore(ci): fix tox framework.
Browse files Browse the repository at this point in the history
  • Loading branch information
spencer-tb committed Oct 29, 2024
1 parent d20b3c4 commit 4049d2b
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions src/cli/eofwrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,15 +176,20 @@ def wrap_file(self, in_path: str, out_path: str, traces: bool):

if fixture.pre:
for address, account in fixture.pre.root.items():
if account is None or account.code is None or len(account.code) == 0:
if (
account is None
or account.code is None
or len(account.code) == 0
):
continue

try:
wrapped = wrap_code(account.code)
except ValueError as e:
self.metrics[self.ACCOUNTS_INVALID_EOF] += 1
_inc_counter(
self.metrics[self.VALIDATION_ERRORS], self._short_exception_msg(e)
self.metrics[self.VALIDATION_ERRORS],
self._short_exception_msg(e),
)
continue

Expand All @@ -210,7 +215,9 @@ def wrap_file(self, in_path: str, out_path: str, traces: bool):
self.unique_eof.update(fixture_eof_codes)
self.metrics[self.UNIQUE_ACCOUNTS_WRAPPED] = len(self.unique_eof)
except Exception as e:
_inc_counter(self.metrics[self.GENERATION_ERRORS], self._short_exception_msg(e))
_inc_counter(
self.metrics[self.GENERATION_ERRORS], self._short_exception_msg(e)
)

self.metrics[self.FIXTURES_CANT_GENERATE] += 1
self.metrics[self.ACCOUNTS_CANT_GENERATE] += len(fixture_eof_codes)
Expand Down Expand Up @@ -262,13 +269,10 @@ def _wrap_fixture(self, fixture: BlockchainFixture, traces: bool):
base_fee_per_gas=header.base_fee_per_gas,
withdrawals_root=header.withdrawals_root,
parent_beacon_block_root=header.parent_beacon_block_root,
requests_root=header.requests_root,
requests_hash=header.requests_hash,
)
assert not fixture_block.ommers
assert not fixture_block.withdrawals
assert not fixture_block.deposit_requests
assert not fixture_block.withdrawal_requests
assert not fixture_block.consolidation_requests

for fixture_tx in fixture_block.txs:
fixture_tx_dump = fixture_tx.model_dump()
Expand Down

0 comments on commit 4049d2b

Please sign in to comment.