The wallet importprivkey
command triggers a rescan of the entire block chain unless explicitly asked not to. This oftentimes is not intentional, and there has so far not existed a way to abort a rescan in progress.
This PR adds support for a new RPC command abortrescan
which will prompt ScanForWalletTransactions
to stop scanning.