diff --git a/src/init.cpp b/src/init.cpp index ec2d3bdb1..b4cc62797 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -2042,7 +2042,7 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler) } pwalletMain->consolidationInterval = consolidationInterval; - pwalletMain->nextConsolidation = pwalletMain->consolidationInterval + chainActive.Tip()->GetHeight(); + pwalletMain->nextConsolidation = pwalletMain->consolidationInterval + chainActive.Height(); LogPrintf("%s: set nextConsolidation=%d\n", __func__, pwalletMain->nextConsolidation ); //Validate Sapling Addresses @@ -2066,7 +2066,7 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler) sweepInterval = 10; } pwalletMain->sweepInterval = sweepInterval; - pwalletMain->nextSweep = pwalletMain->sweepInterval + chainActive.Tip()->GetHeight(); + pwalletMain->nextSweep = pwalletMain->sweepInterval + chainActive.Height(); LogPrintf("%s: set nextSweep=%d with sweepInterval=%d\n", __func__, pwalletMain->nextSweep, pwalletMain->sweepInterval ); fSweepTxFee = GetArg("-zsweepfee", DEFAULT_SWEEP_FEE); fSweepMapUsed = !mapMultiArgs["-zsweepaddress"].empty();