Skip to content

Conversation

@ghost
Copy link

@ghost ghost commented Jun 7, 2022

This is a follow up commit of #25203.

logging: de-duplicate logging category output for the feeest messages (e.g. where I found duplicates), as these category prefixes are now printed automatically since #24464

@jonatack
Copy link
Member

jonatack commented Jun 7, 2022

Thanks for looking. I left this message unchanged in #25286, as it seems useful to understanding the message itself rather than just being a category prefix. Though others may see it as a duplicate category, I don't know.

@ghost ghost changed the title scripted-diff: remove duplicate categories from LogPrint output logging: remove duplicate categories from LogPrint output Jun 7, 2022
@ghost ghost requested a review from jonatack June 7, 2022 14:53
@jonatack
Copy link
Member

jonatack commented Jun 7, 2022

Yes, seems better now. Though, as I wrote above, I'm not sure this should be changed. Currently, the following would be logged, and without "FeeEst:" it may not be very clear.

[estimatefee] FeeEst: 5 > 60% decay 0.96200: feerate: 2326.67 from (2292.02 - 2925.26) 82.00% 16.3/(19.9 0 mem 0.0 out) Fail: (1979.93 - 2292.02) 56.56% 9.9/(17.3 0 mem 0.2 out)

Here are the ESTIMATEFEE logging messages:

$ git grep BCLog::ESTIMATEFEE
src/policy/fees.cpp:376:    LogPrint(BCLog::ESTIMATEFEE, "FeeEst: %d > %.0f%% decay %.5f: feerate: %g from (%g - %g) %.2f%% %.1f/(%.1f %d mem %.1f out) Fail: (%g - %g) %.2f%% %.1f/(%.1f %d mem %.1f out)\n",
src/policy/fees.cpp:457:    LogPrint(BCLog::ESTIMATEFEE, "Reading estimates: %u buckets counting confirms up to %u blocks\n",
src/policy/fees.cpp:476:        LogPrint(BCLog::ESTIMATEFEE, "Blockpolicy error, blocks ago is negative for mempool tx\n");
src/policy/fees.cpp:484:            LogPrint(BCLog::ESTIMATEFEE, "Blockpolicy error, mempool tx removed from >25 blocks,bucketIndex=%u already\n",
src/policy/fees.cpp:493:            LogPrint(BCLog::ESTIMATEFEE, "Blockpolicy error, mempool tx removed from blockIndex=%u,bucketIndex=%u already\n",
src/policy/fees.cpp:566:        LogPrint(BCLog::ESTIMATEFEE, "Blockpolicy error mempool tx %s already being tracked\n",
src/policy/fees.cpp:614:        LogPrint(BCLog::ESTIMATEFEE, "Blockpolicy error Transaction had negative blocksToConfirm\n");
src/policy/fees.cpp:664:        LogPrint(BCLog::ESTIMATEFEE, "Blockpolicy first recorded height %u\n", firstRecordedHeight);
src/policy/fees.cpp:668:    LogPrint(BCLog::ESTIMATEFEE, "Blockpolicy estimates updated by %u of %u block txs, since last block %u of %u tracked, mempool map size %u, max target %u from %s\n",
src/policy/fees.cpp:1014:    LogPrint(BCLog::ESTIMATEFEE, "Recorded %u unconfirmed txs from mempool in %gs\n", num_entries, (endclear - startclear)*0.000001);

@laanwj
Copy link
Member

laanwj commented Jun 16, 2022

Though, as I wrote above, I'm not sure this should be changed

Also divided on this. The message is already hard to understand as-is, if it just begins with numbers doesn't make it better.

@maflcko
Copy link
Member

maflcko commented Jun 16, 2022

Closing for now, as it appears questionable

@maflcko maflcko closed this Jun 16, 2022
@bitcoin bitcoin locked and limited conversation to collaborators Jun 16, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants