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

QA fixes #181

Merged
merged 3 commits into from
Jul 23, 2021
Merged

QA fixes #181

merged 3 commits into from
Jul 23, 2021

Conversation

c0rv0s
Copy link
Contributor

@c0rv0s c0rv0s commented Jul 23, 2021

What was wrong:

  • tx timer class would cause crash if there was no TX_TIMER_WEBHOOK in .env
  • keeper functions that performed a profit estimation would cause crash if gas strategy couldn't be fetched

How it was fixed:

  • tx timer class will do nothing if there is no TX_TIMER_WEBHOOK in .env
  • profit estimation functions wrapped in try/except, harvest and tend bots will ignore estimation and continue running if an exception is raised i.e. gas price couldn't be fetched

@sajanrajdev
Copy link
Collaborator

Thank you very much for tackling these issues. It seems like the tx_timer env variable issue is now handled properly. Unfortunately, I continue to encounter the gas_utils.py issue when running any test since test suites run on the local environment:

tests/sett/test_strategy_flow.py:6: in <module>
    from tests.sett.generic_strategy_tests.strategy_flow import (
tests/sett/generic_strategy_tests/strategy_flow.py:5: in <module>
    from helpers.sett.SnapshotManager import SnapshotManager
helpers/sett/SnapshotManager.py:39: in <module>
    from helpers.gas_utils import gas_strategies
helpers/gas_utils.py:80: in <module>
    gas_strategies.set_default(gas_strategies.fast)
helpers/gas_utils.py:58: in set_default
    gas_price(strategy)
E   ConnectionError: Not connected to any network

I believe this occurs because just by importing the gas_strategies, the gas_price() method gets called automatically to set the default. I realized that all instances of gas_strategies throughout the repo call set_default() directly so the call within the library seems redundant. Will go ahead and remove it.

@sajanrajdev
Copy link
Collaborator

@c0rv0s, removing this line from the gas_utils.py library fixed the test issues, I just want to confirm that it doesn't break your usage of it.

@sajanrajdev sajanrajdev merged commit 6a113e0 into master Jul 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants