Skip to content

Commit

Permalink
Do not increase mockTime when mining EVM block.
Browse files Browse the repository at this point in the history
Anvil now (foundry-rs/foundry#9160) supports
blocks with constant timestamp, so there is no need to explicitly
bump the mock time when generating a new block (it can remain the same).

This simplifies testing logic potentially, as tests do not need to
expect increasing timestamps after setting a mock time.
  • Loading branch information
domob1812 committed Oct 25, 2024
1 parent 06bb07e commit b83263b
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions xayax/eth.py
Original file line number Diff line number Diff line change
Expand Up @@ -281,9 +281,6 @@ def mine (self):
self.rpc.evm_mine ()
else:
self.rpc.evm_mine (self.mockTime)
# We need to bump the mock time at least by one second
# so the next block can be mined, too.
self.mockTime += 1

def deployContract (self, addr, data, *args, **kwargs):
"""
Expand Down

0 comments on commit b83263b

Please sign in to comment.