We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
circleci/mariadb:10-bionic
eth-tester is installed via web3[tester]
eth-tester
web3[tester]
def test_time_travel_doesnt_jump_far_web3(): web3 = Web3(EthereumTesterProvider()) MAX_TIMESTAMP = 33040162800 t0 = web3.eth.getBlock("latest")["timestamp"] assert t0 > 0 ε = 10 for tΔ in [3 * 10**6, 6 * 10**8, 9 * 10**7, MAX_TIMESTAMP // 2]: current_timestamp = web3.eth.getBlock("pending")["timestamp"] to_timestamp = current_timestamp + tΔ web3.manager.provider.ethereum_tester.time_travel(to_timestamp) web3.manager.provider.ethereum_tester.mine_block() t1 = web3.eth.getBlock("latest")["timestamp"] assert t0 + tΔ <= t1 <= t0 + tΔ + ε t0 = t1
This worked on my Mac but failed in my build with:
____________________ test_time_travel_doesnt_jump_far_web3 _____________________ def test_time_travel_doesnt_jump_far_web3(): web3 = Web3(EthereumTesterProvider()) MAX_TIMESTAMP = 33040162800 t0 = web3.eth.getBlock("latest")["timestamp"] assert t0 > 0 ε = 10 for tΔ in [3 * 10**6, 6 * 10**8, 9 * 10**7, MAX_TIMESTAMP // 2]: current_timestamp = web3.eth.getBlock("pending")["timestamp"] to_timestamp = current_timestamp + tΔ web3.manager.provider.ethereum_tester.time_travel(to_timestamp) web3.manager.provider.ethereum_tester.mine_block() t1 = web3.eth.getBlock("latest")["timestamp"] > assert t0 + tΔ <= t1 <= t0 + tΔ + ε E assert 12641211944 <= ((1579776492 + 3000000) + 10) test/test_timetravel.py:36: AssertionError
This works on Mac so perhaps there is an inconsistency with how it works on Ubuntu?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
circleci/mariadb:10-bionic
eth-tester
is installed viaweb3[tester]
What was wrong?
This worked on my Mac but failed in my build with:
How can it be fixed?
This works on Mac so perhaps there is an inconsistency with how it works on Ubuntu?
The text was updated successfully, but these errors were encountered: