From 49ee2a0ad88e0e656234b769d806987784ff1e28 Mon Sep 17 00:00:00 2001 From: Russell Yanofsky Date: Tue, 5 Dec 2017 15:57:12 -0500 Subject: Avoid wallet code writing node settings file Change wallet loading code to access settings through the Chain interface instead of writing settings.json directly. --- src/interfaces/chain.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/interfaces') diff --git a/src/interfaces/chain.h b/src/interfaces/chain.h index 3395741b1b..96c64a3cb1 100644 --- a/src/interfaces/chain.h +++ b/src/interfaces/chain.h @@ -262,11 +262,18 @@ public: //! Current RPC serialization flags. virtual int rpcSerializationFlags() = 0; + //! Get settings value. + virtual util::SettingsValue getSetting(const std::string& arg) = 0; + + //! Get list of settings values. + virtual std::vector getSettingsList(const std::string& arg) = 0; + //! Return /settings.json setting value. virtual util::SettingsValue getRwSetting(const std::string& name) = 0; - //! Write a setting to /settings.json. - virtual bool updateRwSetting(const std::string& name, const util::SettingsValue& value) = 0; + //! Write a setting to /settings.json. Optionally just update the + //! setting in memory and do not write the file. + virtual bool updateRwSetting(const std::string& name, const util::SettingsValue& value, bool write=true) = 0; //! Synchronously send transactionAddedToMempool notifications about all //! current mempool transactions to the specified handler and return after -- cgit v1.2.3