aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/rpcwallet.cpp
diff options
context:
space:
mode:
authorRussell Yanofsky <russ@yanofsky.org>2019-01-31 17:51:41 -0500
committerRussell Yanofsky <russ@yanofsky.org>2019-02-01 13:05:30 -0500
commitdb2d0932336552c6d2df15ed82751ca8dee7e37f (patch)
tree334e8291354f0568cbef793ac0ab44e49169ea73 /src/wallet/rpcwallet.cpp
parenta8d645c934ff878773332c34347ba2d91b4dee05 (diff)
Add suggested rescanblockchain comments
From https://github.com/bitcoin/bitcoin/pull/14711#discussion_r252043990
Diffstat (limited to 'src/wallet/rpcwallet.cpp')
-rw-r--r--src/wallet/rpcwallet.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp
index f2898250ca..94d92a65b6 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);
}