feat(wallet): enable auto-consolidation by default
Default the auto_consolidate setting to true, so a full-node wallet keeps its note count down on its own out of the box (users can still turn it off). A missing key in an older config loads the new default, enabling it on upgrade, which is intended. The page-state mirror default matches. Safety is unchanged and reinforced in comments: auto-consolidation reuses the "keep in each address" engine — z_mergetoaddress [addr] -> addr — so funds NEVER move between addresses; it only sheds notes within each address. It never uses the "into one address" sweep. It also only runs when the wallet is idle AND unlocked (a locked encrypted wallet never auto-runs) and only touches addresses with more than kAutoConsolidateMinNotes notes, so a fresh or lean wallet stays dormant. Build + tests + hygiene green. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -6374,6 +6374,9 @@ void App::finishConsolidation()
|
||||
|
||||
// Start the shared ConsolidationRun with the SAME guards as startConsolidation but SILENTLY and with a
|
||||
// caller-chosen (gentle) config — the background driver's entry point. No toasts; marks the run as ours.
|
||||
// Like the manual "keep in each address" mode, this run merges every address's notes back into THAT SAME
|
||||
// address (z_mergetoaddress [addr] -> addr in postConsolidationCall), so auto-consolidation NEVER moves
|
||||
// funds between addresses — it only sheds notes. It never uses the "into one address" sweep.
|
||||
bool App::startConsolidationQuiet(const std::vector<services::NoteGroup>& groups, services::RunConfig cfg)
|
||||
{
|
||||
if (isLiteBuild() || capture_mode_ || shutting_down_.load()) return false;
|
||||
|
||||
Reference in New Issue
Block a user