MCPcopy Create free account
hub / github.com/bitcoin/bitcoin / UpdateWalletSetting

Function UpdateWalletSetting

src/wallet/wallet.cpp:132–143  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

130}
131
132static void UpdateWalletSetting(interfaces::Chain& chain,
133 const std::string& wallet_name,
134 std::optional<bool> load_on_startup,
135 std::vector<bilingual_str>& warnings)
136{
137 if (!load_on_startup) return;
138 if (load_on_startup.value() && !AddWalletSetting(chain, wallet_name)) {
139 warnings.emplace_back(Untranslated("Wallet load on startup setting could not be updated, so wallet may not be loaded next node startup."));
140 } else if (!load_on_startup.value() && !RemoveWalletSetting(chain, wallet_name)) {
141 warnings.emplace_back(Untranslated("Wallet load on startup setting could not be updated, so wallet may still be loaded next node startup."));
142 }
143}
144
145/**
146 * Refresh mempool status so the wallet is in an internally consistent state and

Callers 5

RemoveWalletFunction · 0.85
LoadWalletInternalFunction · 0.85
CreateWalletFunction · 0.85
wallet.cppFile · 0.85

Calls 5

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

Tested by

no test coverage detected