Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixes a bug from replay mode that impacts when running non-replay modes #102

Merged
merged 3 commits into from
Aug 31, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions fastlane_bot/events/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1276,6 +1276,9 @@ def set_network_to_tenderly_if_replay(
forked_from_block : int
The block number the Tenderly fork was created from.
"""
if not replay_from_block:
return mgr, tenderly_uri, forked_from_block

if replay_from_block and last_block == 0:
mgr.cfg.logger.info(f"Setting network connection to Tenderly idx: {loop_idx}")
mgr, forked_from_block = set_network_connection_to_tenderly(
Expand Down
4 changes: 2 additions & 2 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -519,10 +519,10 @@ def run(
break

# Delete all Tenderly forks except the most recent one
forks_to_cleanup = delete_tenderly_forks(forks_to_cleanup, mgr)

if replay_from_block:
forks_to_cleanup = delete_tenderly_forks(forks_to_cleanup, mgr)
break

if loop_idx == 1:
mgr.cfg.logger.info(
"""
Expand Down
Loading