Add <datadir>/settings.json persistent settings storage.

Persistent settings are used in followup PRs #15936 to unify gui settings
between bitcoin-qt and bitcoind, and #15937 to add a load_on_startup flag to
the loadwallet RPC and maintain a dynamic list of wallets that should be loaded
on startup that also can be shared between bitcoind and bitcoin-qt.
This commit is contained in:
Russell Yanofsky
2019-04-28 19:08:26 -04:00
parent eb682c5700
commit 9c69cfe4c5
13 changed files with 255 additions and 6 deletions

View File

@@ -66,6 +66,11 @@ public:
//! Choose network parameters.
virtual void selectParams(const std::string& network) = 0;
//! Read and update <datadir>/settings.json file with saved settings. This
//! needs to be called after selectParams() because the settings file
//! location is network-specific.
virtual bool initSettings(std::string& error) = 0;
//! Get the (assumed) blockchain size.
virtual uint64_t getAssumedBlockchainSize() = 0;