The functionality is already provided in the BIP32 utility library util/bip32.h with the exact same name and function signature.
rpc: deduplicate WriteHDKeypath() used in decodepsbt #19555
pull theStack wants to merge 1 commits into bitcoin:master from theStack:20200719-rpc-dedup-writehdkeypath changing 1 files +1 −19-
theStack commented at 3:55 PM on July 19, 2020: member
-
55057ffc51
rpc: deduplicate WriteHDKeypath() used in decodepsbt
The functionality is already provided in the BIP32 utility library util/bip32.h with the exact same name and function signature.
- DrahtBot added the label RPC/REST/ZMQ on Jul 19, 2020
-
DrahtBot commented at 12:04 AM on July 20, 2020: member
<!--e57a25ab6845829454e8d69fc972939a-->
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
<!--174a7506f384e20aa4161008e828411d-->
Conflicts
Reviewers, this pull request conflicts with the following ones:
- #18531 (rpc: Assert that RPCArg names are equal to CRPCCommand ones by MarcoFalke)
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.
-
instagibbs commented at 1:43 PM on July 20, 2020: member
concept ACK
for reviewers this is the utility outstanding after this PR: https://github.com/bitcoin/bitcoin/blob/master/src/util/bip32.cpp#L53-L66
Exposing my bit-shift noobery, but why does it shift the path value left then right? https://github.com/bitcoin/bitcoin/blob/master/src/util/bip32.cpp#L57
-
theStack commented at 1:58 PM on July 20, 2020: member
Exposing my bit-shift noobery, but why does it shift the path value left then right? https://github.com/bitcoin/bitcoin/blob/master/src/util/bip32.cpp#L57
That is done to clear the most-significant bit (Bit 31 for an
uint32_t), i.e. should be identical to the expressioni & ~0x80000000. -
instagibbs commented at 2:01 PM on July 20, 2020: member
Oh duh(should have re-read bip32 bip)
utACK https://github.com/bitcoin/bitcoin/pull/19555/commits/55057ffc51697daafac1224664d5e3258ae0b116
-
jonatack commented at 2:29 PM on July 20, 2020: member
ACK 55057ffc51697daafac1224664d5e3258ae0b116
Good find.
According to git blame the remaining version of this function was added in e7652d3 in Nov 2018.
-
achow101 commented at 3:58 PM on July 20, 2020: member
ACK 55057ffc51697daafac1224664d5e3258ae0b116
- fanquake merged this on Jul 21, 2020
- fanquake closed this on Jul 21, 2020
- theStack deleted the branch on Dec 1, 2020
- Fabcien referenced this in commit 67d8646457 on Sep 2, 2021
- DrahtBot locked this on Feb 15, 2022