fix: large-wallet sync starvation + shutdown/console-flash UX (Windows full node) #2

Open
DanS wants to merge 12 commits from fix/balance-poll-sync-contention into dev
2 changed files with 22 additions and 0 deletions
Showing only changes of commit 6d26ccd0ed - Show all commits

View File

@@ -2066,6 +2066,25 @@ void RenderSettingsPage(App* app) {
else ImGui::TextDisabled("%s", wv); else ImGui::TextDisabled("%s", wv);
} }
// Large-wallet nudge: the BDB wallet.dat bloats with shielded-note witness data and
// never shrinks in place. Past a threshold, hint the user toward consolidating notes
// (Merge to Address) to curb further growth. Full-node only (lite has no wallet.dat here).
static constexpr uint64_t kWalletBloatWarnBytes = 500ull * 1024 * 1024; // 500 MB
if (app->supportsFullNodeLifecycleActions() && wallet_size > kWalletBloatWarnBytes) {
ImGui::Dummy(ImVec2(0, Layout::spacingSm()));
ImGui::PushStyleColor(ImGuiCol_Text, Warning());
ImGui::PushTextWrapPos(leftX + contentW);
ImGui::TextWrapped("%s", TR("wallet_size_warn"));
ImGui::PopTextWrapPos();
ImGui::PopStyleColor();
if (ImGui::IsItemHovered()) material::Tooltip("%s", TR("tt_wallet_size_warn"));
ImGui::Dummy(ImVec2(0, Layout::spacingXs()));
if (material::ActionButton("##walletconsolidate", TR("wallet_size_consolidate"),
ICON_MD_CALL_MERGE, material::ActionTier::Secondary))
ShieldDialog::show(ShieldDialog::Mode::MergeToAddress);
if (ImGui::IsItemHovered()) material::Tooltip("%s", TR("tt_merge"));
}
// Row 3: folder buttons (their own row so the path gets the full width). // Row 3: folder buttons (their own row so the path gets the full width).
ImGui::Dummy(ImVec2(0, Layout::spacingXs())); ImGui::Dummy(ImVec2(0, Layout::spacingXs()));
material::ButtonFlow ff(contentW); material::ButtonFlow ff(contentW);

View File

@@ -667,6 +667,9 @@ void I18n::loadBuiltinEnglish()
strings_["wiz_pin_mismatch"] = "PINs do not match"; strings_["wiz_pin_mismatch"] = "PINs do not match";
strings_["settings_data_dir"] = "Data Dir"; strings_["settings_data_dir"] = "Data Dir";
strings_["settings_wallet_size_label"] = "Wallet Size"; strings_["settings_wallet_size_label"] = "Wallet Size";
strings_["wallet_size_warn"] = "This wallet file is large. Consolidating your notes can curb further growth.";
strings_["tt_wallet_size_warn"] = "Shielded wallets grow with each note's witness data — merging many notes into one address reduces it. Back up first.";
strings_["wallet_size_consolidate"] = "Consolidate notes\xE2\x80\xA6";
strings_["settings_debug_changed"] = "Debug categories changed \xe2\x80\x94 restart daemon to apply"; strings_["settings_debug_changed"] = "Debug categories changed \xe2\x80\x94 restart daemon to apply";
strings_["settings_auto_detected"] = "Auto-detected from DRAGONX.conf"; strings_["settings_auto_detected"] = "Auto-detected from DRAGONX.conf";
strings_["settings_visual_effects"] = "Visual Effects"; strings_["settings_visual_effects"] = "Visual Effects";