From 8c44857c9b68f03c42fbf15421e3c6b353a5dc7b Mon Sep 17 00:00:00 2001 From: Ouziel Slama Date: Fri, 10 Jan 2025 15:58:13 +0000 Subject: [PATCH] fix regtest --- .../counterpartycore/test/regtest/regtestnode.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/counterparty-core/counterpartycore/test/regtest/regtestnode.py b/counterparty-core/counterpartycore/test/regtest/regtestnode.py index 49339b458..2619a24e2 100644 --- a/counterparty-core/counterpartycore/test/regtest/regtestnode.py +++ b/counterparty-core/counterpartycore/test/regtest/regtestnode.py @@ -725,6 +725,21 @@ def test_reorg(self): self.wait_for_counterparty_server(last_block) + # other tests expect the second node to be connected if running + print("Re-connect to the first node...") + self.bitcoin_cli_2( + "addnode", + "localhost:18445", + "onetry", + _out=sys.stdout, + _err=sys.stdout, + ) + # fix block count for other tests + self.block_count -= 1 + + print("Wait for the two nodes to sync...") + last_block = self.wait_for_node_to_sync() + print("Reorg test successful") def test_electrs(self):