Skip to content

Commit

Permalink
Halt loop if header doesn't validate gas limit
Browse files Browse the repository at this point in the history
Otherwise, get an infinite loop, where test hangs.
  • Loading branch information
carver committed Aug 19, 2021
1 parent e4fdeb0 commit 3937a0c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/core/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,9 @@ def fill_block(chain, from_, key, gas, data):
break
else:
raise exc
else:
new_header = chain.get_vm().get_block().header
assert new_header.gas_used > 0
assert new_header.gas_used <= new_header.gas_limit

assert chain.get_vm().get_block().header.gas_used > 0

0 comments on commit 3937a0c

Please sign in to comment.