MCPcopy Create free account
hub / github.com/ElementsProject/elements / UpdateWalletSetting

Function UpdateWalletSetting

src/wallet/wallet.cpp:93–104  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

91}
92
93static void UpdateWalletSetting(interfaces::Chain& chain,
94 const std::string& wallet_name,
95 std::optional<bool> load_on_startup,
96 std::vector<bilingual_str>& warnings)
97{
98 if (!load_on_startup) return;
99 if (load_on_startup.value() && !AddWalletSetting(chain, wallet_name)) {
100 warnings.emplace_back(Untranslated("Wallet load on startup setting could not be updated, so wallet may not be loaded next node startup."));
101 } else if (!load_on_startup.value() && !RemoveWalletSetting(chain, wallet_name)) {
102 warnings.emplace_back(Untranslated("Wallet load on startup setting could not be updated, so wallet may still be loaded next node startup."));
103 }
104}
105
106/**
107 * Refresh mempool status so the wallet is in an internally consistent state and

Callers 3

RemoveWalletFunction · 0.85
LoadWalletInternalFunction · 0.85
CreateWalletFunction · 0.85

Calls 5

AddWalletSettingFunction · 0.85
UntranslatedFunction · 0.85
RemoveWalletSettingFunction · 0.85
emplace_backMethod · 0.80
valueMethod · 0.45

Tested by

no test coverage detected