-
Notifications
You must be signed in to change notification settings - Fork 38.7k
Drop log category in SeedStartup
#29480
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This `LogPrint(BCLog::RAND, ...)` is never logged because the `SeedStartup` function is called at a very early stage, such as during the instantiation of the static `CSignatureCache` object, before any log categories are added. This change addresses this behavior.
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. Code CoverageFor detailed information about the code coverage, see the test coverage report. ReviewsSee the guideline for information on the review process.
If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update. ConflictsReviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first. |
This `LogPrint(BCLog::RAND, ...)` is never logged because the `SeedStartup` function is called at a very early stage, such as during the instantiation of the static `CSignatureCache` object, before any log categories are added. This change addresses this behavior. Github-Pull: bitcoin#29480 (rewritten)
hernanmarino
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK 88468a8
This is outdated and the steps to reproduce no longer work. Currently, it needs something like: diff --git a/src/init.cpp b/src/init.cpp
index faaf3353d0..164f624b4e 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -194,6 +194,11 @@ static void RemovePidFile(const ArgsManager& args)
LogPrintf("Unable to remove PID file (%s): %s\n", fs::PathToString(pid_path), msg);
}
}
+static bool once_flag{[] {
+ auto v{std::vector<uint8_t>(3)};
+ GetStrongRandBytes(v);
+ return true;
+}()};
static std::optional<util::SignalInterrupt> g_shutdown;
and: |
|
review ACK 88468a8 but it would be good to update the context here, given my previous reply. Also, it may be good to use This also clarifies that the this is the only remaining call, which seems like useful context for reviewers. |
|
I won’t be working on this PR in the near future. So, closing it and labeling it "Up for grabs". |
|
Hey! I found this PR while looking at the up for grabs, but I noticed that #30750 replaced LogPrint with LogDebug, and currently on master the log line is printed. As far as I understand, this PR shouldn't be needed anymore, and the "Up for grabs" label can be removed :) |
This
LogPrint(BCLog::RAND, ...)is never logged because theSeedStartupfunction is called at a very early stage, such as during the instantiation of the staticCSignatureCacheobject, before any log categories are added. This PR fixes this behavior.