Merge 349632e022 into merged_master (Bitcoin PR bitcoin/bitcoin#30807)

This commit is contained in:
ivanlele 2026-03-25 13:50:36 +00:00
commit a4f8f89bf4
No known key found for this signature in database
7 changed files with 147 additions and 11 deletions

View file

@ -3318,6 +3318,13 @@ static RPCHelpMan loadtxoutset()
throw JSONRPCError(RPC_INTERNAL_ERROR, strprintf("Unable to load UTXO snapshot: %s. (%s)", util::ErrorString(activation_result).original, path.utf8string()));
}
// Because we can't provide historical blocks during tip or background sync.
// Update local services to reflect we are a limited peer until we are fully sync.
node.connman->RemoveLocalServices(NODE_NETWORK);
// Setting the limited state is usually redundant because the node can always
// provide the last 288 blocks, but it doesn't hurt to set it.
node.connman->AddLocalServices(NODE_NETWORK_LIMITED);
CBlockIndex& snapshot_index{*CHECK_NONFATAL(*activation_result)};
UniValue result(UniValue::VOBJ);