test: Wait for txospender index to be synced in rpc_gettxspendingprevout

Each node's txospender index needs to catch up with the existing chain
before the tests will work.
This commit is contained in:
Ava Chow 2026-03-05 11:17:58 -08:00
parent 2db5c049bb
commit cbdb891de2

View File

@ -77,6 +77,8 @@ class GetTxSpendingPrevoutTest(BitcoinTestFramework):
txidA, txidB, txidC, txidD, txidE, txidF, txidG, txidH = [tx["txid"] for tx in txs]
self.sync_mempools()
self.wait_until(lambda: node0.getindexinfo()["txospenderindex"]["synced"])
self.wait_until(lambda: node1.getindexinfo()["txospenderindex"]["synced"])
mempool = node0.getrawmempool()
assert_equal(len(mempool), 8)
for tx in txs: