Merge bitcoin/bitcoin#26645: util: Include full version id in bug reports

fa825bd227 util: Include full version id in bug reports (MarcoFalke)

Pull request description:

  This will show the unique id of the full source code when the bug occurred, which can help debugging

ACKs for top commit:
  1440000bytes:
    utACK fa825bd227
  theStack:
    ACK fa825bd227
  john-moffett:
    ACK fa825bd227

Tree-SHA512: a7a775718f5f9796b5cffafbb3ace8adb5c163414ec584a57143157fc9dfb86f799e3b9c8365fcb831ee1e9eafc59d699d1653d772c68392de421b3de74dcd61
This commit is contained in:
MarcoFalke 2022-12-07 08:47:05 +01:00
commit 272fb0a5cf
No known key found for this signature in database
GPG Key ID: CE2B75697E69A548

View File

@ -8,6 +8,7 @@
#include <config/bitcoin-config.h>
#endif
#include <clientversion.h>
#include <tinyformat.h>
#include <cstdio>
@ -16,7 +17,10 @@
std::string StrFormatInternalBug(const char* msg, const char* file, int line, const char* func)
{
return strprintf("Internal bug detected: \"%s\"\n%s:%d (%s)\nPlease report this issue here: %s\n", msg, file, line, func, PACKAGE_BUGREPORT);
return strprintf("Internal bug detected: \"%s\"\n%s:%d (%s)\n"
"%s %s\n"
"Please report this issue here: %s\n",
msg, file, line, func, PACKAGE_NAME, FormatFullVersion(), PACKAGE_BUGREPORT);
}
NonFatalCheckError::NonFatalCheckError(const char* msg, const char* file, int line, const char* func)