Skip to content

Commit

Permalink
update of functional test scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
wagerr-builder authored and watto-engineer committed Dec 30, 2022
1 parent d4a5c43 commit dc60283
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
14 changes: 9 additions & 5 deletions test/functional/test_framework/test_framework.py
Original file line number Diff line number Diff line change
Expand Up @@ -1006,9 +1006,13 @@ def setup_network(self):
self.create_simple_node()

self.log.info("Activating DIP3")
self.nodes[0].generate(90)

spork4height=500
if not self.fast_dip3_enforcement:
while self.nodes[0].getblockcount() < 500:
spork4height = self.nodes[0].getblockcount() + 1
self.nodes[0].spork("SPORK_4_DIP0003_ENFORCED", spork4height)
self.wait_for_sporks_same()
while self.nodes[0].getblockcount() < spork4height:
self.nodes[0].generate(10)
else:
self.nodes[0].spork("SPORK_4_DIP0003_ENFORCED", 50)
Expand All @@ -1034,8 +1038,7 @@ def setup_network(self):
force_finish_mnsync(self.nodes[i + 1])

# Enable InstantSend (including block filtering) and ChainLocks by default
if self.fast_dip3_enforcement:
self.nodes[0].spork("SPORK_4_DIP0003_ENFORCED", 50)
self.nodes[0].spork("SPORK_4_DIP0003_ENFORCED", spork4height)
self.nodes[0].sporkupdate("SPORK_2_INSTANTSEND_ENABLED", 0)
self.nodes[0].sporkupdate("SPORK_3_INSTANTSEND_BLOCK_FILTERING", 0)
self.nodes[0].sporkupdate("SPORK_19_CHAINLOCKS_ENABLED", 0)
Expand Down Expand Up @@ -1292,6 +1295,7 @@ def check_dkg_comitments():
wait_until(check_dkg_comitments, timeout=timeout, sleep=1)

def wait_for_quorum_list(self, quorum_hash, nodes, timeout=15, sleep=2, llmq_type_name="llmq_test"):
self.nodes[0].spork("SPORK_4_DIP0003_ENFORCED", 10)
def wait_func():
self.log.info("quorums: " + str(self.nodes[0].quorum("list")))
if quorum_hash in self.nodes[0].quorum("list")[llmq_type_name]:
Expand Down Expand Up @@ -1344,7 +1348,7 @@ def mine_quorum(self, llmq_type_name="llmq_test", llmq_type=100, expected_connec
nodes = [self.nodes[0]] + [mn.node for mn in mninfos_online]

# move forward to next DKG
skip_count = 24 - (self.nodes[0].getblockcount() % 24)
skip_count = 60 - (self.nodes[0].getblockcount() % 60)
if skip_count != 0:
self.bump_mocktime(1, nodes=nodes)
self.nodes[0].generate(skip_count)
Expand Down
2 changes: 1 addition & 1 deletion test/functional/wallet_encryption.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def run_test(self):
# Make sure the wallet isn't encrypted first
address = self.nodes[0].getnewaddress()
privkey = self.nodes[0].dumpprivkey(address)
assert_equal(privkey[:1], "c")
assert_equal(privkey[:1], "N")
assert_equal(len(privkey), 52)
assert_raises_rpc_error(-15, "Error: running with an unencrypted wallet, but walletpassphrase was called", self.nodes[0].walletpassphrase, 'ff', 1)
assert_raises_rpc_error(-15, "Error: running with an unencrypted wallet, but walletpassphrasechange was called.", self.nodes[0].walletpassphrasechange, 'ff', 'ff')
Expand Down

0 comments on commit dc60283

Please sign in to comment.