Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion qa/rpc-tests/llmq-is-cl-conflicts.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def test_chainlock_overrides_islock(self, test_block_conflict):
block = self.create_block(self.nodes[0], [rawtx2_obj])
if test_block_conflict:
submit_result = self.nodes[0].submitblock(ToHex(block))
assert(submit_result == "conflict-tx-lock")
assert submit_result == "conflict-tx-lock", submit_result

cl = self.create_chainlock(self.nodes[0].getblockcount() + 1, block.sha256)
self.test_node.send_clsig(cl)
Expand Down
6 changes: 4 additions & 2 deletions qa/rpc-tests/llmq-is-retroactive.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,10 @@ def run_test(self):

self.log.info("trying normal IS lock")
txid = self.nodes[0].sendtoaddress(self.nodes[0].getnewaddress(), 1)
# 3 nodes should be enough to create an IS lock even if nodes 4 and 5 (which have no tx itself)
# are the only "neighbours" in intra-quorum connections for one of them.
# Nodes 4 and 5 reject the tx (high minrelaytxfee). The remaining 3
# quorum members must see it before an IS lock can form.
for node in self.nodes[1:4]:
self.wait_for_tx(txid, node)
self.wait_for_instantlock(txid, self.nodes[0], do_assert=True)
set_mocktime(get_mocktime() + 1)
set_node_times(self.nodes, get_mocktime())
Expand Down
15 changes: 9 additions & 6 deletions qa/rpc-tests/spark_mintspend.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,7 @@ def run_test(self):
assert tr_type == 'mint', 'Unexpected transaction type: {}'.format(tr_type)
# assert(self.wait_for_instantlock(tr, self.nodes[0]))

self.nodes[0].generate(1)
self.sync_all()

# Unconfirmed mints cannot be spent (wallet treats nHeight < 1 as immature).
res = False
firoAddress = self.nodes[0].getnewaddress()
try:
Expand All @@ -65,16 +63,21 @@ def run_test(self):

assert not res, 'Did not raise spend exception, but should be.'

# generate last confirmation block - now all transactions should be confimed
# This test has no quorum to InstantLock the mints, so age them past
# WAIT_FOR_ISLOCK_TIMEOUT before mining their first confirmation.
set_node_times(self.nodes, int(time()) + 10 * 60 + 1)

# One confirmation is enough to spend (ZC_MINT_CONFIRMATIONS == 1), and
# two minted coins make a valid cover set.
self.nodes[0].generate(1)
self.sync_all()

for tr in mint_trans:
info = self.nodes[0].gettransaction(tr[0])
confrms = info['confirmations']
assert confrms >= 1, \
'Confirmations should be 3, ' \
'due to 3 blocks was generated after transaction was created,' \
'Confirmations should be 1, ' \
'due to 1 block was generated after transaction was created,' \
'but was {}.'.format(confrms)
tr_type = info['details'][0]['category']
assert tr_type == 'mint', 'Unexpected transaction type'
Expand Down
2 changes: 1 addition & 1 deletion qa/rpc-tests/test_framework/test_framework.py
Original file line number Diff line number Diff line change
Expand Up @@ -742,7 +742,7 @@ def check_tx():
elif w and not expected:
raise AssertionError("waiting unexpectedly succeeded")

def wait_for_instantlock(self, txid, node, expected=True, timeout=15, do_assert=False):
def wait_for_instantlock(self, txid, node, expected=True, timeout=30, do_assert=False):
def check_instantlock():
try:
return node.getrawtransaction(txid, True)["instantlock"]
Expand Down
Loading
Loading