Skip to content

Commit 0e9f7fb

Browse files
committed
test: move helper wait_for_tx from test_framework to feature_llmq_is_retroactive
1 parent 71ef10a commit 0e9f7fb

File tree

2 files changed

+10
-11
lines changed

2 files changed

+10
-11
lines changed

test/functional/feature_llmq_is_retroactive.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,16 @@ def set_test_params(self):
2424
# -whitelist is needed to avoid the trickling logic on node0
2525
self.set_dash_test_params(5, 4, [["-whitelist=127.0.0.1"], [], [], [], ["-minrelaytxfee=0.001"]])
2626

27+
def wait_for_tx(self, txid, node, expected=True, timeout=60):
28+
def check_tx():
29+
try:
30+
self.bump_mocktime(1)
31+
return node.getrawtransaction(txid)
32+
except:
33+
return False
34+
if self.wait_until(check_tx, timeout=timeout, sleep=1, do_assert=expected) and not expected:
35+
raise AssertionError("waiting unexpectedly succeeded")
36+
2737
def run_test(self):
2838
self.nodes[0].sporkupdate("SPORK_17_QUORUM_DKG_ENABLED", 0)
2939
# Turn mempool IS signing off

test/functional/test_framework/test_framework.py

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1903,17 +1903,6 @@ def make_change(from_node, amount_in, amount_out, fee):
19031903
ret = {**decoded, **ret}
19041904
return ret
19051905

1906-
# TODO: move it to feature_llmq_is_retroactive.py
1907-
def wait_for_tx(self, txid, node, expected=True, timeout=60):
1908-
def check_tx():
1909-
try:
1910-
self.bump_mocktime(1)
1911-
return node.getrawtransaction(txid)
1912-
except:
1913-
return False
1914-
if self.wait_until(check_tx, timeout=timeout, sleep=1, do_assert=expected) and not expected:
1915-
raise AssertionError("waiting unexpectedly succeeded")
1916-
19171906
def create_isdlock(self, hextx):
19181907
tx = tx_from_hex(hextx)
19191908
tx.rehash()

0 commit comments

Comments
 (0)