mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-14 12:43:40 +02:00
Merge 5f3a0574c4 into merged_master (Bitcoin PR bitcoin/bitcoin#29262)
This commit is contained in:
commit
bbedf496f0
2 changed files with 3 additions and 5 deletions
|
|
@ -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;
|
||||
},
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue