-
Notifications
You must be signed in to change notification settings - Fork 37.7k
p2p: add time when deserialize file db for ReadAnchors #21483
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
@brunoerg To be precise, this change is not a refactoring as it does change a log message, i.e., behavior :) |
@hebasto Agreed! Just removed it! I was in doubt about the "tag" |
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ConflictsNo conflicts as of last run. |
f1dbc9c
to
1b897ed
Compare
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.
Tested ACK 1b897ed on Ubuntu 20.04
Loaded 2 addresses from anchors.dat 0ms
Is this time usually 0ms
?
Interesting, I think considering the number of addresses for this case this value should be always low (0ms? ou near it?). |
Needs rebase if still relevant |
1b897ed
to
c7ace43
Compare
try { | ||
DeserializeFileDB(anchors_db_path, anchors, CLIENT_VERSION | ADDRV2_FORMAT); | ||
LogPrintf("Loaded %i addresses from %s\n", anchors.size(), fs::quoted(fs::PathToString(anchors_db_path.filename()))); | ||
LogPrintf("Loaded %i addresses from %s %dms\n", anchors.size(), fs::PathToString(anchors_db_path.filename()), GetTimeMillis() - nStart); |
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.
I'm not sure about moving away from fs::quoted here. There's also other places where quoted is used for logging. I'm not sure what's the plan there, but I'd like to avoid back-and-forth.
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.
I agree.. I will close it.
This PR adds time duration for anchors.dat deserialization (following the same logic that peers.dat).
Also, it removes the quotes of
"anchors.dat"
inLogPrintf
to follow the pattern of other logs.