@@ -2571,7 +2571,7 @@ static RPCHelpMan dumptxoutset()
25712571{
25722572 return RPCHelpMan{
25732573 " dumptxoutset" ,
2574- " Write the serialized UTXO set to disk ." ,
2574+ " Write the serialized UTXO set to a file ." ,
25752575 {
25762576 {" path" , RPCArg::Type::STR, RPCArg::Optional::NO, " Path to the output file. If relative, will be prefixed by datadir." },
25772577 },
@@ -2699,7 +2699,7 @@ static RPCHelpMan loadtxoutset()
26992699{
27002700 return RPCHelpMan{
27012701 " loadtxoutset" ,
2702- " Load the serialized UTXO set from disk .\n "
2702+ " Load the serialized UTXO set from a file .\n "
27032703 " Once this snapshot is loaded, its contents will be "
27042704 " deserialized into a second chainstate data structure, which is then used to sync to "
27052705 " the network's tip. "
@@ -2753,34 +2753,14 @@ static RPCHelpMan loadtxoutset()
27532753 throw JSONRPCError (RPC_INTERNAL_ERROR, strprintf (" Unable to load UTXO snapshot, "
27542754 " assumeutxo block hash in snapshot metadata not recognized (%s)" , base_blockhash.ToString ()));
27552755 }
2756- int max_secs_to_wait_for_headers = 60 * 10 ;
2757- CBlockIndex* snapshot_start_block = nullptr ;
2758-
2759- LogPrintf (" [snapshot] waiting to see blockheader %s in headers chain before snapshot activation\n " ,
2760- base_blockhash.ToString ());
2761-
2762- while (max_secs_to_wait_for_headers > 0 ) {
2763- snapshot_start_block = WITH_LOCK (::cs_main,
2756+ CBlockIndex* snapshot_start_block = WITH_LOCK (::cs_main,
27642757 return chainman.m_blockman .LookupBlockIndex (base_blockhash));
2765- max_secs_to_wait_for_headers -= 1 ;
2766-
2767- if (!IsRPCRunning ()) {
2768- throw JSONRPCError (RPC_CLIENT_NOT_CONNECTED, " Shutting down" );
2769- }
2770-
2771- if (!snapshot_start_block) {
2772- std::this_thread::sleep_for (std::chrono::seconds (1 ));
2773- } else {
2774- break ;
2775- }
2776- }
27772758
27782759 if (!snapshot_start_block) {
2779- LogPrintf (" [snapshot] timed out waiting for snapshot start blockheader %s\n " ,
2780- base_blockhash.ToString ());
27812760 throw JSONRPCError (
27822761 RPC_INTERNAL_ERROR,
2783- " Timed out waiting for base block header to appear in headers chain" );
2762+ strprintf (" The base block header (%s) must appear in the headers chain. Make sure all headers are syncing, and call this RPC again." ,
2763+ base_blockhash.ToString ()));
27842764 }
27852765 if (!chainman.ActivateSnapshot (afile, metadata, false )) {
27862766 throw JSONRPCError (RPC_INTERNAL_ERROR, " Unable to load UTXO snapshot " + fs::PathToString (path));
0 commit comments