mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-18 22:35:39 +01:00
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:
@@ -66,6 +66,7 @@ public:
|
||||
bool softSetArg(const std::string& arg, const std::string& value) override { return gArgs.SoftSetArg(arg, value); }
|
||||
bool softSetBoolArg(const std::string& arg, bool value) override { return gArgs.SoftSetBoolArg(arg, value); }
|
||||
void selectParams(const std::string& network) override { SelectParams(network); }
|
||||
bool initSettings(std::string& error) override { return gArgs.InitSettings(error); }
|
||||
uint64_t getAssumedBlockchainSize() override { return Params().AssumedBlockchainSize(); }
|
||||
uint64_t getAssumedChainStateSize() override { return Params().AssumedChainStateSize(); }
|
||||
std::string getNetwork() override { return Params().NetworkIDString(); }
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user