Merge 5f3a0574c4 into merged_master (Bitcoin PR bitcoin/bitcoin#29262)

This commit is contained in:
Byron Hambly 2025-11-18 13:27:40 +02:00
commit bbedf496f0
No known key found for this signature in database
GPG key ID: DE8F6EA20A661697
2 changed files with 3 additions and 5 deletions

View file

@ -3057,12 +3057,11 @@ static RPCHelpMan loadtxoutset()
if (!chainman.ActivateSnapshot(afile, metadata, false)) {
throw JSONRPCError(RPC_INTERNAL_ERROR, "Unable to load UTXO snapshot " + fs::PathToString(path));
}
CBlockIndex* new_tip{WITH_LOCK(::cs_main, return chainman.ActiveTip())};
UniValue result(UniValue::VOBJ);
result.pushKV("coins_loaded", metadata.m_coins_count);
result.pushKV("tip_hash", new_tip->GetBlockHash().ToString());
result.pushKV("base_height", new_tip->nHeight);
result.pushKV("tip_hash", snapshot_start_block->GetBlockHash().ToString());
result.pushKV("base_height", snapshot_start_block->nHeight);
result.pushKV("path", fs::PathToString(path));
return result;
},

View file

@ -1038,5 +1038,4 @@ class BitcoinTestFramework(metaclass=BitcoinTestMetaClass):
return self.config["components"].getboolean("USE_BDB")
def has_blockfile(self, node, filenum: str):
blocksdir = node.datadir_path / self.chain / 'blocks'
return (blocksdir / f"blk{filenum}.dat").is_file()
return (node.blocks_path/ f"blk{filenum}.dat").is_file()