-
Notifications
You must be signed in to change notification settings - Fork 725
Finish address encoding cleanup #2414
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
cc44f9d to
5c39626
Compare
|
Rebased after #2359 merge, ready to go. |
random-zebra
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 5c39626da8695a46a7d71e65ce9f1f0f50103eda
Added are: * Vector(arg1,arg2,arg3,...) constructs a vector with the specified arguments as elements. The vector's type is derived from the arguments. If some of the arguments are rvalue references, they will be moved into place rather than copied (which can't be achieved using list initialization). * Cat(vector1,vector2) returns a concatenation of the two vectors, efficiently moving elements when relevant. Vector generalizes (and replaces) the Singleton function in src/descriptor.cpp, and Cat replaces the Cat function in bech32.cpp
Adaptation of btc@ebfe217b15d21656a173e5c102f826d17c6c8be4
The latest version of these two functions is inside the key_io files and not in base58.
Also remove a needless loop in DecodeBase58 to prune zeroes in the base256 output of the conversion. The number of zeroes is implied by keeping track explicitly of the length during the loop.
…base58 characters
5c39626 to
a470c34
Compare
|
Rebased on master, conflicts solved. |
random-zebra
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.
rebase utACK a470c34
Fuzzbawls
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 a470c34
Decoupled from #2411 Tor's v3 addr support, built on top of #2359.
This PR finishes the address encoding cleanup, removing the
CBase58,CBitcoinSecret,CBitcoinExtKey, andCBitcoinExtPubKeyclasses, in favor of using the KeyIO::Encode/Decode functions. Furthermore, all PIVX-specific address logic is moved to key_io.{h,cpp}, leaving base58.{h,cpp} as a pure utility that implements the base58 encoding/decoding logic.Plus, includes some general utility functions for std::vector and std::string.
Adaptation of the following PRs: