From db2d0932336552c6d2df15ed82751ca8dee7e37f Mon Sep 17 00:00:00 2001 From: Russell Yanofsky Date: Thu, 31 Jan 2019 17:51:41 -0500 Subject: [PATCH] Add suggested rescanblockchain comments From https://github.com/bitcoin/bitcoin/pull/14711#discussion_r252043990 --- src/wallet/rpcwallet.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp index f2898250caa..94d92a65b61 100644 --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -3459,6 +3459,11 @@ UniValue rescanblockchain(const JSONRPCRequest& request) if (tip_height) { start_block = locked_chain->getBlockHash(start_height); + // If called with a stop_height, set the stop_height here to + // trigger a rescan to that height. + // If called without a stop height, leave stop_height as null here + // so rescan continues to the tip (even if the tip advances during + // rescan). if (stop_height) { stop_block = locked_chain->getBlockHash(*stop_height); }