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
  1. theStack commented at 3:55 PM on July 19, 2020: member

    The functionality is already provided in the BIP32 utility library util/bip32.h with the exact same name and function signature.

  2. 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.
    55057ffc51
  3. DrahtBot added the label RPC/REST/ZMQ on Jul 19, 2020
  4. 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.

  5. 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

  6. 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 expression i & ~0x80000000.

  7. instagibbs commented at 2:01 PM on July 20, 2020: member
  8. 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.

  9. achow101 commented at 3:58 PM on July 20, 2020: member

    ACK 55057ffc51697daafac1224664d5e3258ae0b116

  10. fanquake merged this on Jul 21, 2020
  11. fanquake closed this on Jul 21, 2020

  12. theStack deleted the branch on Dec 1, 2020
  13. Fabcien referenced this in commit 67d8646457 on Sep 2, 2021
  14. DrahtBot locked this on Feb 15, 2022

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-13 15:14 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me