diff --git a/src/interfaces/chain.h b/src/interfaces/chain.h index be596b1765..8aac48446a 100644 --- a/src/interfaces/chain.h +++ b/src/interfaces/chain.h @@ -361,7 +361,7 @@ public: virtual bool updateRwSetting(const std::string& name, const SettingsUpdate& update_function) = 0; //! Replace a setting in /settings.json with a new value. - virtual bool overwriteRwSetting(const std::string& name, common::SettingsValue& value, bool write = true) = 0; + virtual bool overwriteRwSetting(const std::string& name, common::SettingsValue value, bool write = true) = 0; //! Delete a given setting in /settings.json. virtual bool deleteRwSettings(const std::string& name, bool write = true) = 0; diff --git a/src/node/interfaces.cpp b/src/node/interfaces.cpp index 54b986c926..44a2cb93f2 100644 --- a/src/node/interfaces.cpp +++ b/src/node/interfaces.cpp @@ -828,7 +828,7 @@ public: // Now dump value to disk if requested return *action == interfaces::SettingsAction::SKIP_WRITE || args().WriteSettingsFile(); } - bool overwriteRwSetting(const std::string& name, common::SettingsValue& value, bool write) override + bool overwriteRwSetting(const std::string& name, common::SettingsValue value, bool write) override { if (value.isNull()) return deleteRwSettings(name, write); return updateRwSetting(name, [&](common::SettingsValue& settings) { diff --git a/src/wallet/load.cpp b/src/wallet/load.cpp index 129b5c7c2a..1149ce0a47 100644 --- a/src/wallet/load.cpp +++ b/src/wallet/load.cpp @@ -69,7 +69,7 @@ bool VerifyWallets(WalletContext& context) // Pass write=false because no need to write file and probably // better not to. If unnamed wallet needs to be added next startup // and the setting is empty, this code will just run again. - chain.overwriteRwSetting("wallet", wallets, /*write=*/false); + chain.overwriteRwSetting("wallet", std::move(wallets), /*write=*/false); } }