Browse Source

Merge branch 'dev' into duke

pull/57/head
Duke Leto 3 years ago
parent
commit
4299665914
  1. 10
      src/init.cpp

10
src/init.cpp

@ -2073,9 +2073,15 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
CBlockIndex *pindexRescan = chainActive.Tip();
if (clearWitnessCaches || GetBoolArg("-rescan", false))
{
pwalletMain->ClearNoteWitnessCache();
pindexRescan = chainActive.Genesis();
int rescanHeight = GetArg("-rescanheight", 0);
// Must be used with -rescanheight
if( GetBoolArg("-keepnotewitnesscache", false) && rescanHeight > 0 ) {
LogPrintf("%s: keeping NoteWitnessCache with rescan height=%d\n", __func__, rescanHeight);
} else {
pwalletMain->ClearNoteWitnessCache();
}
pindexRescan = chainActive.Genesis();
if (rescanHeight > 0) {
if (rescanHeight > chainActive.Tip()->GetHeight()) {
pindexRescan = chainActive.Tip();

Loading…
Cancel
Save