If you are importing several private keys into a wallet, you don’t want the rescan to trigger every time, so you might pass rescan=false
to importprivkey
. If you accidentally do this with the last key as well, you end up having to find a bogus private key to import, just to trigger the rescan process.
This PR triggers a rescan for already known keys, iff the user passes an explicit true
to the rescan
argument (i.e. if third argument is not null
and fRescan
is set).