message: Rescan progress indicator block height based
diff: @@ -948,9 +948,11 @@ bool AppInit2(boost::thread_group& threadGroup)
  uiInterface.InitMessage(_("Rescanning..."));
  LogPrintf("Rescanning last %i blocks (from block %i)...\n", pindexBest->nHeight - pindexRescan->nHeight, pindexRescan->nHeight);
  nStart = GetTimeMillis();
  - int totalBlocks = nBestHeight - pindexRescan->nHeight;
  - pwalletMain->ScanForWalletTransactions(pindexRescan, true, [totalBlocks] (int numOfBlocks) -> bool {
  - uiInterface.InitMessage(strprintf("Rescanning... %d / %d", numOfBlocks, totalBlocks));
  +
  + int startHeight = pindexRescan->nHeight;
  + int endHeight = nBestHeight;
  + pwalletMain->ScanForWalletTransactions(pindexRescan, true, [startHeight, endHeight] (int numOfBlocks) -> bool {
  + uiInterface.InitMessage(strprintf("Rescanning... %d / %d", startHeight+numOfBlocks, endHeight));
  return true;
  });
  LogPrintf(" rescan %15dms\n", GetTimeMillis() - nStart);
  