Skip to content

Commit

Permalink
Fix incorrect mocktime set in [no] miner fund test
Browse files Browse the repository at this point in the history
Summary:
`node.setmocktime()` is called but the node is restarted immediately after.
Move setting the mock time to after the node starts back up since it's restarted many
times in this test.

Test Plan: `test_runner.py bchn-no-miner-fund-activation.py`

Reviewers: #bitcoin_abc, nakihito, Fabien

Reviewed By: #bitcoin_abc, nakihito, Fabien

Differential Revision: https://reviews.bitcoinabc.org/D6090
  • Loading branch information
jasonbcox authored and ftrader committed May 15, 2020
1 parent c751840 commit ca25e2d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/functional/bchn-no-miner-fund-activation.py
Expand Up @@ -69,7 +69,6 @@ def check_all_bip9_state(status):
def run_test_for(bit, name, address):
# Make sure we have a clean slate.
node.invalidateblock(node.getblockhash(height + 1))
node.setmocktime(1580000000)
self.run_miner_fund_test(bit, name, address)

run_test_for(0, 'minerfund', MINER_FUND_ADDR)
Expand Down Expand Up @@ -118,6 +117,7 @@ def run_miner_fund_test(self, bit, name, fund_address):
["-blockversion={}".format(version), "-phononactivationtime={}".format(PHONON_ACTIVATION_TIME)])

node = self.nodes[0]
node.setmocktime(1580000000)
address = node.get_deterministic_priv_key().address

def get_best_vote():
Expand Down

0 comments on commit ca25e2d

Please sign in to comment.