test: sync funding block before isolating nodes

test_alternate_witness_tx mines the taproot funding output on node0
with sync_fun=self.no_op and immediately disconnects. node1 later
includes the script-path spend via generateblock. If the funding
block has not reached node1, that call fails with
bad-txns-inputs-missingorspent.

Drop the no_op so generate() uses the default sync_all before the
partition.

Signed-off-by: shaurya2k06 <shaurya2k06@gmail.com>
This commit is contained in:
shaurya2k06
2026-08-14 15:22:14 +05:30
parent 11090c8bb3
commit 8454fb2bd7

View File

@@ -283,7 +283,7 @@ class ListTransactionsTest(BitcoinTestFramework):
desc = descsum_create(f"tr({xpubs[0].to_string()}/*,pk({xprvs[1].to_string()}/*))")
assert_equal(wallet.importdescriptors([{"desc": desc, "active": True, "timestamp": "now"}])[0]["success"], True)
default_wallet.sendtoaddress(wallet.getnewaddress(address_type="bech32m"), 1)
self.generate(self.nodes[0], 1, sync_fun=self.no_op)
self.generate(self.nodes[0], 1)
# Isolate node0 for later reorg coverage
self.disconnect_nodes(0, 1)
self.disconnect_nodes(0, 2)