-
Notifications
You must be signed in to change notification settings - Fork 38.7k
UpdateTip: log only one line at most per block #7795
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
UpdateTip: log only one line at most per block #7795
Conversation
|
Does your fix mean that the debug log can miss some of the previously logged lines now, because only one warning is printed? |
src/main.cpp
Outdated
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.
When you are touching this part, can you please also move this comment about 100 blocks just over the for cycle checking these 100 blocks?
Edit: the questions is, how often such case can happen, if it all...
|
Concept ACK, less lines, more informations on line line, great! |
|
utACK 5553b1dc3654b5aec6a6161d867f93b1509d3379 modulo @paveljanik's nit. |
Well there are two sources of warning:
I'm not sure it makes sense to ever have both, but I could accumulate the warnings instead of replacing them, sure. Edit: OH wait, the first warning can trigger multiple times, potential for every bit. Yes I certainly need to do this. |
Avoid logging two or more lines per block in UpdateTip by adding the warning into the UpdateTip log message.
5553b1d to
f20d42e
Compare
|
Ok, fixed both of @paveljanik 's nits. Warnings are now collected and moved the comment. |
|
Thanks. (I haven't had the time to investigate myself but had the feeling, that it could be as you said). ACK f20d42e |
|
utACK. Are LogPrintF's that are composed across multiple lines instead of in a single logprint more likely to get torn by logprints from other threads? Should the field potentially be named "warnings" since it can contain more than one? |
|
Can we move this forward? |
|
utACK f20d42e |
f20d42e UpdateTip: log only one line at most per block (Wladimir J. van der Laan)
f20d42e UpdateTip: log only one line at most per block (Wladimir J. van der Laan)
Avoid logging two or more lines per block in UpdateTip by adding the (optional) warning into the UpdateTip log message.
Before:
After: