aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces
diff options
context:
space:
mode:
Diffstat (limited to 'src/interfaces')
-rw-r--r--src/interfaces/node.cpp1
-rw-r--r--src/interfaces/node.h5
2 files changed, 6 insertions, 0 deletions
diff --git a/src/interfaces/node.cpp b/src/interfaces/node.cpp
index 834a16ecf5..33f0dac263 100644
--- a/src/interfaces/node.cpp
+++ b/src/interfaces/node.cpp
@@ -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(); }
diff --git a/src/interfaces/node.h b/src/interfaces/node.h
index b88b5bc14e..a9680c42b5 100644
--- a/src/interfaces/node.h
+++ b/src/interfaces/node.h
@@ -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;