aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces/chain.h
diff options
context:
space:
mode:
authorRussell Yanofsky <russ@yanofsky.org>2019-05-01 15:12:44 -0400
committerRussell Yanofsky <russ@yanofsky.org>2020-08-13 09:44:48 -0400
commit642ad31b418bbf8da06cb3641329b0810e18e55b (patch)
treeef5b18d395f7766112a330c7e126703e20bb9a27 /src/interfaces/chain.h
parentb4d0366b47dd9b8fe29cc9a100dcdf6ca1d3cabf (diff)
Add loadwallet and createwallet RPC load_on_startup options
This maintains a persistent list of wallets stored in settings that will automatically be loaded on startup. Being able to load a wallet automatically on startup will be more useful in the GUI when the option to create wallets is added in #15006, but it's reasonable to expose this feature by RPC as well.
Diffstat (limited to 'src/interfaces/chain.h')
-rw-r--r--src/interfaces/chain.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/interfaces/chain.h b/src/interfaces/chain.h
index bbeb0fa801..053d40335f 100644
--- a/src/interfaces/chain.h
+++ b/src/interfaces/chain.h
@@ -7,6 +7,7 @@
#include <optional.h> // For Optional and nullopt
#include <primitives/transaction.h> // For CTransactionRef
+#include <util/settings.h> // For util::SettingsValue
#include <functional>
#include <memory>
@@ -269,6 +270,12 @@ public:
//! Current RPC serialization flags.
virtual int rpcSerializationFlags() = 0;
+ //! Return <datadir>/settings.json setting value.
+ virtual util::SettingsValue getRwSetting(const std::string& name) = 0;
+
+ //! Write a setting to <datadir>/settings.json.
+ virtual bool updateRwSetting(const std::string& name, const util::SettingsValue& value) = 0;
+
//! Synchronously send transactionAddedToMempool notifications about all
//! current mempool transactions to the specified handler and return after
//! the last one is sent. These notifications aren't coordinated with async