From 61ecffd07460beac9d8c71fe52fb2afb307289e9 Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Tue, 6 Sep 2022 14:30:06 -0400 Subject: [PATCH] Change default sweep interval to 10 and consolidation to be deterministic every 45 blocks --- src/wallet/asyncrpcoperation_sweep.cpp | 8 ++++---- src/wallet/wallet.cpp | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/wallet/asyncrpcoperation_sweep.cpp b/src/wallet/asyncrpcoperation_sweep.cpp index fcf4769bb..6045cf46f 100644 --- a/src/wallet/asyncrpcoperation_sweep.cpp +++ b/src/wallet/asyncrpcoperation_sweep.cpp @@ -284,10 +284,10 @@ bool AsyncRPCOperation_sweep::main_impl() { } if (sweepComplete) { - int sweepInterval = GetArg("-zsweepinterval", 5); - if (sweepInterval < 1) { - fprintf(stderr,"%s: Invalid sweep interval of %d, setting to default of 5\n", __func__, sweepInterval); - sweepInterval = 5; + int sweepInterval = GetArg("-zsweepinterval", 10); + if (sweepInterval < 5) { + fprintf(stderr,"%s: Invalid sweep interval of %d, setting to default of 10\n", __func__, sweepInterval); + sweepInterval = 10; } pwalletMain->nextSweep = sweepInterval + chainActive.Tip()->GetHeight(); pwalletMain->fSweepRunning = false; diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index e024d826c..8cee74ed2 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -559,7 +559,7 @@ void CWallet::RunSaplingConsolidation(int blockHeight) { return; } - int consolidateInterval = rand() % 5 + 5; + int consolidateInterval = 45; if(fZdebug) fprintf(stderr,"%s: height=%d interval=%d\n", __func__, blockHeight, consolidateInterval);