test: Wait for local services to update in feature_assumeutxo

Github-Pull: bitcoin/bitcoin#30880
Rebased-From: 19f4a7c95a
This commit is contained in:
Fabian Jahr 2024-09-12 16:16:54 +02:00 committed by Ava Chow
parent b329ed739b
commit d39262e5d4
No known key found for this signature in database
GPG key ID: 17565732E08E5E41

View file

@ -313,9 +313,9 @@ class AssumeutxoTest(BitcoinTestFramework):
self.sync_blocks(nodes=(miner, snapshot_node))
# Check the base snapshot block was stored and ensure node signals full-node service support
self.wait_until(lambda: not try_rpc(-1, "Block not found", snapshot_node.getblock, snapshot_block_hash))
assert 'NETWORK' in snapshot_node.getnetworkinfo()['localservicesnames']
self.wait_until(lambda: 'NETWORK' in snapshot_node.getnetworkinfo()['localservicesnames'])
# Now the snapshot_node is sync, verify the ibd_node can sync from it
# Now that the snapshot_node is synced, verify the ibd_node can sync from it
self.connect_nodes(snapshot_node.index, ibd_node.index)
assert 'NETWORK' in ibd_node.getpeerinfo()[0]['servicesnames']
self.sync_blocks(nodes=(ibd_node, snapshot_node))
@ -660,7 +660,7 @@ class AssumeutxoTest(BitcoinTestFramework):
self.wait_until(lambda: len(n2.getchainstates()['chainstates']) == 1)
# Once background chain sync completes, the full node must start offering historical blocks again.
assert {'NETWORK', 'NETWORK_LIMITED'}.issubset(n2.getnetworkinfo()['localservicesnames'])
self.wait_until(lambda: {'NETWORK', 'NETWORK_LIMITED'}.issubset(n2.getnetworkinfo()['localservicesnames']))
completed_idx_state = {
'basic block filter index': COMPLETE_IDX,