Skip to content

Commit

Permalink
Revert "Merge bitcoin#14738: Tests: Fix running wallet_listtransactio…
Browse files Browse the repository at this point in the history
…ns.py individually through test_runner.py"

This reverts commit b9c7345.
  • Loading branch information
UdjinM6 authored and Munkybooty committed Mar 8, 2022
1 parent 71e16e2 commit 9d625c7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
12 changes: 6 additions & 6 deletions test/functional/test_framework/test_framework.py
Original file line number Diff line number Diff line change
Expand Up @@ -493,6 +493,11 @@ def sync_all(self, nodes=None, **kwargs):
self.sync_blocks(nodes, **kwargs)
self.sync_mempools(nodes, **kwargs)

def disable_mocktime(self):
self.mocktime = 0
for node in self.nodes:
node.mocktime = 0

def bump_mocktime(self, t, update_nodes=True, nodes=None):
self.mocktime += t
if update_nodes:
Expand Down Expand Up @@ -586,11 +591,6 @@ def _initialize_chain(self, extra_args=None):
for node in self.nodes:
node.wait_for_rpc_connection()

# For backward compatibility of the python scripts with previous
# versions of the cache, set mocktime to Jan 1,
# 2014 + (201 * 10 * 60)"""
self.mocktime = 1388534400 + (201 * 10 * 60)

# Create a 200-block-long chain; each of the 4 first nodes
# gets 25 mature blocks and 25 immature.
# Note: To preserve compatibility with older versions of
Expand All @@ -611,7 +611,7 @@ def _initialize_chain(self, extra_args=None):
# Shut them down, and clean up cache directories:
self.stop_nodes()
self.nodes = []
self.mocktime = 0
self.disable_mocktime()

def cache_path(n, *paths):
chain = get_chain_folder(get_datadir_path(self.options.cachedir, n), self.chain)
Expand Down
3 changes: 1 addition & 2 deletions test/functional/wallet_listtransactions.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,12 @@
class ListTransactionsTest(BitcoinTestFramework):
def set_test_params(self):
self.num_nodes = 2
self.set_cache_mocktime()

def skip_test_if_missing_module(self):
self.skip_if_no_wallet()

def run_test(self):
self.nodes[0].generate(1) # Get out of IBD
self.sync_all()
# Simple send, 0 to 1:
txid = self.nodes[0].sendtoaddress(self.nodes[1].getnewaddress(), 0.1)
self.sync_all()
Expand Down

0 comments on commit 9d625c7

Please sign in to comment.