Skip to content

Commit

Permalink
feat: add functional test for submitchainlock far ahead in future
Browse files Browse the repository at this point in the history
  • Loading branch information
knst committed Jul 5, 2024
1 parent 6df604b commit c36c8c7
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions test/functional/feature_llmq_chainlocks.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,14 @@ def run_test(self):
block = self.nodes[0].getblock(self.nodes[0].getblockhash(h))
assert block['chainlock']

# Update spork to SPORK_19_CHAINLOCKS_ENABLED and test its behaviour
self.log.info(f"Test submitchainlock for too high block")
assert_raises_rpc_error(-1, f"no quorum found. Current tip height: {self.nodes[1].getblockcount()}", self.nodes[1].submitchainlock, '0000000000000000000000000000000000000000000000000000000000000000', 'a5c69505b5744524c9ed6551d8a57dc520728ea013496f46baa8a73df96bfd3c86e474396d747a4af11aaef10b17dbe80498b6a2fe81938fe917a3fedf651361bfe5367c800d23d3125820e6ee5b42189f0043be94ce27e73ea13620c9ef6064', self.nodes[1].getblockcount() + 300)

self.log.info("Update spork to SPORK_19_CHAINLOCKS_ENABLED and test its behaviour")
self.nodes[0].sporkupdate("SPORK_19_CHAINLOCKS_ENABLED", 1)
self.wait_for_sporks_same()

# Generate new blocks and verify that they are not chainlocked
self.log.info("Generate new blocks and verify that they are not chainlocked")
previous_block_hash = self.nodes[0].getbestblockhash()
for _ in range(2):
block_hash = self.nodes[0].generate(1)[0]
Expand Down

0 comments on commit c36c8c7

Please sign in to comment.