Change default sweep interval to 10 and consolidation to be deterministic every 45 blocks

This commit is contained in:
Duke Leto
2022-09-06 14:30:06 -04:00
parent 8d8f988a19
commit 61ecffd074
2 changed files with 5 additions and 5 deletions

View File

@@ -284,10 +284,10 @@ bool AsyncRPCOperation_sweep::main_impl() {
} }
if (sweepComplete) { if (sweepComplete) {
int sweepInterval = GetArg("-zsweepinterval", 5); int sweepInterval = GetArg("-zsweepinterval", 10);
if (sweepInterval < 1) { if (sweepInterval < 5) {
fprintf(stderr,"%s: Invalid sweep interval of %d, setting to default of 5\n", __func__, sweepInterval); fprintf(stderr,"%s: Invalid sweep interval of %d, setting to default of 10\n", __func__, sweepInterval);
sweepInterval = 5; sweepInterval = 10;
} }
pwalletMain->nextSweep = sweepInterval + chainActive.Tip()->GetHeight(); pwalletMain->nextSweep = sweepInterval + chainActive.Tip()->GetHeight();
pwalletMain->fSweepRunning = false; pwalletMain->fSweepRunning = false;

View File

@@ -559,7 +559,7 @@ void CWallet::RunSaplingConsolidation(int blockHeight) {
return; return;
} }
int consolidateInterval = rand() % 5 + 5; int consolidateInterval = 45;
if(fZdebug) if(fZdebug)
fprintf(stderr,"%s: height=%d interval=%d\n", __func__, blockHeight, consolidateInterval); fprintf(stderr,"%s: height=%d interval=%d\n", __func__, blockHeight, consolidateInterval);