-
Notifications
You must be signed in to change notification settings - Fork 38.8k
util: Remove unused itostr #18449
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
util: Remove unused itostr #18449
Conversation
|
Nice. I guess we can replace (it's only used in two real places) |
|
Concept ACK |
fa7f612 to
faaf1cb
Compare
Done |
| const std::string itostr_with_locale = itostr(random_int32); | ||
| assert(itostr_without_locale == itostr_with_locale); | ||
| const std::string tostring_with_locale = ToString(random_int64); | ||
| assert(tostring_without_locale == tostring_with_locale); |
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.
Isn't this comparing a string with itself now?
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.
assert(tostring_without_locale
== tostring_with_locale);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.
The fuzzer's goal is to assert the function does not respond to changing the locale. So generating the same string with two different locales is needed. The check should assert that they are the same.
|
Concept ACK: thanks for helping getting rid of accidental locale dependence! Scary valgrind error in Travis (unrelated I presume): 👀 |
|
ACK faaf1cb |
|
Code review ACK faaf1cb. |
|
The issue valgrind found is a long-standing issue where the vector of nodes in Connman is not locked: See #18457 . Indeed unrelated to this pull. |
Summary: This is a backport of Core [[bitcoin/bitcoin#18449 | PR18449]] [1/2] bitcoin/bitcoin@fac96ff Test Plan: ``` ninja all check-all grep -R itostr .. ``` Reviewers: #bitcoin_abc, Fabien Reviewed By: #bitcoin_abc, Fabien Subscribers: Fabien Differential Revision: https://reviews.bitcoinabc.org/D8890
Currently unused, but if someone really needed to use a helper with this functionality in the future, they could use
ToString.