wallet: handle disabled startup settings

Return a persistence failure when dynamic settings are disabled so
wallet operations finish with their existing startup-setting warning.
This avoids an uncaught exception in Qt and RPC errors after the wallet
state has already changed. Keep in-memory and no-op updates unchanged.
This commit is contained in:
Robert Hamilton
2026-09-05 19:58:40 -05:00
parent b7113e6f42
commit a34fc8b11a
3 changed files with 8 additions and 5 deletions

View File

@@ -843,7 +843,7 @@ public:
});
if (!action) return false;
// Now dump value to disk if requested
return *action != interfaces::SettingsAction::WRITE || args().WriteSettingsFile();
return *action != interfaces::SettingsAction::WRITE || (args().GetSettingsPath() && args().WriteSettingsFile());
}
bool overwriteRwSetting(const std::string& name, common::SettingsValue value, interfaces::SettingsAction action) override
{