Changeset View
Changeset View
Standalone View
Standalone View
test/functional/feature_notifications.py
Show First 20 Lines • Show All 71 Lines • ▼ Show 20 Lines | def run_test(self): | ||||
# directory content should equal the generated transaction hashes | # directory content should equal the generated transaction hashes | ||||
txids_rpc = list( | txids_rpc = list( | ||||
map(lambda t: t['txid'], self.nodes[1].listtransactions("*", block_count))) | map(lambda t: t['txid'], self.nodes[1].listtransactions("*", block_count))) | ||||
assert_equal( | assert_equal( | ||||
sorted(txids_rpc), sorted( | sorted(txids_rpc), sorted( | ||||
os.listdir( | os.listdir( | ||||
self.walletnotify_dir))) | self.walletnotify_dir))) | ||||
self.stop_node(1) | |||||
for tx_file in os.listdir(self.walletnotify_dir): | for tx_file in os.listdir(self.walletnotify_dir): | ||||
os.remove(os.path.join(self.walletnotify_dir, tx_file)) | os.remove(os.path.join(self.walletnotify_dir, tx_file)) | ||||
self.log.info("test -walletnotify after rescan") | self.log.info("test -walletnotify after rescan") | ||||
# restart node to rescan to force wallet notifications | # restart node to rescan to force wallet notifications | ||||
self.restart_node(1) | self.start_node(1) | ||||
connect_nodes(self.nodes[0], self.nodes[1]) | connect_nodes(self.nodes[0], self.nodes[1]) | ||||
wait_until( | wait_until( | ||||
lambda: len( | lambda: len( | ||||
os.listdir( | os.listdir( | ||||
self.walletnotify_dir)) == block_count, | self.walletnotify_dir)) == block_count, | ||||
timeout=10) | timeout=10) | ||||
Show All 33 Lines |