From 2db5c049bb3cf9a323c100ce9d4957a937c01624 Mon Sep 17 00:00:00 2001 From: Ava Chow Date: Thu, 5 Mar 2026 11:17:17 -0800 Subject: [PATCH 1/2] test: Sync mempools after tx creation in rpc_gettxspendingprevout The test will query information from the other nodes about mempool txs, ensure that the txs are in their mempools beforehand. --- test/functional/rpc_gettxspendingprevout.py | 1 + 1 file changed, 1 insertion(+) diff --git a/test/functional/rpc_gettxspendingprevout.py b/test/functional/rpc_gettxspendingprevout.py index 04bc4237d05..ecf42e0a870 100755 --- a/test/functional/rpc_gettxspendingprevout.py +++ b/test/functional/rpc_gettxspendingprevout.py @@ -76,6 +76,7 @@ class GetTxSpendingPrevoutTest(BitcoinTestFramework): txs = [txA, txB, txC, txD, txE, txF, txG, txH] txidA, txidB, txidC, txidD, txidE, txidF, txidG, txidH = [tx["txid"] for tx in txs] + self.sync_mempools() mempool = node0.getrawmempool() assert_equal(len(mempool), 8) for tx in txs: From cbdb891de23d98dae3cfb3c4d993d6111df0aaa4 Mon Sep 17 00:00:00 2001 From: Ava Chow Date: Thu, 5 Mar 2026 11:17:58 -0800 Subject: [PATCH 2/2] 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. --- test/functional/rpc_gettxspendingprevout.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/functional/rpc_gettxspendingprevout.py b/test/functional/rpc_gettxspendingprevout.py index ecf42e0a870..972056e627b 100755 --- a/test/functional/rpc_gettxspendingprevout.py +++ b/test/functional/rpc_gettxspendingprevout.py @@ -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: