mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 06:28:31 +01:00
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`.
This commit is contained in:
@@ -91,3 +91,7 @@ bool SelectBaseParamsFromCommandLine() {
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool AreBaseParamsConfigured() {
|
||||
return pCurrentBaseParams != NULL;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user