aboutsummaryrefslogtreecommitdiff
path: root/src/chainparamsbase.h
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2014-07-15 10:22:27 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2014-07-15 10:26:44 +0200
commit96ff9d64037bba25c080b4f26e64e7f01c6f34f1 (patch)
treef712605e533b91ad26b22cd7f16248dac9c79b92 /src/chainparamsbase.h
parent2c0f019bfc0b9381b6dcad5960df48379b8dfe20 (diff)
Can't log to debug log before chain params initialized
Add a function `AreBaseParamsConfigured` and use this to check before writing to the debug log. This avoids assertions when the application happens to log too early, which happens in the GUI. Messages logged before the base parameters are configured can be shown using `-printtoconsole`.
Diffstat (limited to 'src/chainparamsbase.h')
-rw-r--r--src/chainparamsbase.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/chainparamsbase.h b/src/chainparamsbase.h
index 4a3b268909..4398f69548 100644
--- a/src/chainparamsbase.h
+++ b/src/chainparamsbase.h
@@ -49,4 +49,10 @@ void SelectBaseParams(CBaseChainParams::Network network);
*/
bool SelectBaseParamsFromCommandLine();
+/**
+ * Return true if SelectBaseParamsFromCommandLine() has been called to select
+ * a network.
+ */
+bool AreBaseParamsConfigured();
+
#endif