From 96ff9d64037bba25c080b4f26e64e7f01c6f34f1 Mon Sep 17 00:00:00 2001 From: "Wladimir J. van der Laan" Date: Tue, 15 Jul 2014 10:22:27 +0200 Subject: 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`. --- src/chainparamsbase.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/chainparamsbase.cpp') diff --git a/src/chainparamsbase.cpp b/src/chainparamsbase.cpp index 19a9e72cc..720e24c4a 100644 --- a/src/chainparamsbase.cpp +++ b/src/chainparamsbase.cpp @@ -91,3 +91,7 @@ bool SelectBaseParamsFromCommandLine() { } return true; } + +bool AreBaseParamsConfigured() { + return pCurrentBaseParams != NULL; +} -- cgit v1.2.3