mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-13 12:33:42 +02:00
Regression test for pegin validation issues during sync
Add a regression test for https://github.com/ElementsProject/elements/issues/891 . This checks that we can sync successfully when making a bunch of new blocks just as we have transient loss of parent daemon connectivity. This reliably fails without the fix, and reliably succeeds with it. (It stands in for the situation, more common in production, where we sync faster than the parent daemon can keep up after a long outage.)
This commit is contained in:
parent
7f79f72ae9
commit
e5ba4e819e
1 changed files with 7 additions and 3 deletions
|
|
@ -125,6 +125,7 @@ class FedPegTest(BitcoinTestFramework):
|
|||
'-parent_bech32_hrp=bcrt',
|
||||
# Turn of consistency checks that can cause assert when parent node stops
|
||||
# and a peg-in transaction fails this belt-and-suspenders check.
|
||||
# NOTE: This can cause spurious problems in regtest, and should be dealt with in a better way.
|
||||
'-checkmempool=0',
|
||||
]
|
||||
if not self.options.parent_bitcoin:
|
||||
|
|
@ -470,9 +471,12 @@ class FedPegTest(BitcoinTestFramework):
|
|||
self.start_node(1)
|
||||
connect_nodes_bi(self.nodes, 0, 1)
|
||||
|
||||
# Don't make a block, race condition when pegin-invalid block
|
||||
# is awaiting further validation, nodes reject subsequent blocks
|
||||
# even ones they create
|
||||
# Make a bunch of blocks while catching up, as a regression test for
|
||||
# https://github.com/ElementsProject/elements/issues/891 (sporadic
|
||||
# failures when catching up after loss of parent daemon connectivity.)
|
||||
print("Generating some blocks, to stress-test handling of parent daemon reconnection")
|
||||
sidechain.generate(10)
|
||||
|
||||
print("Now waiting for node to re-evaluate peg-in witness failed block... should take a few seconds")
|
||||
self.sync_all(self.node_groups)
|
||||
print("Completed!\n")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue