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: contributor

    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: contributor

    <!--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. DrahtBot cross-referenced this on Jul 20, 2020 from issue rpc: remove deprecated CRPCCommand constructor by MarcoFalke
  6. 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

  7. theStack commented at 1:58 PM on July 20, 2020: contributor

    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.

  8. instagibbs commented at 2:01 PM on July 20, 2020: member
  9. jonatack commented at 2:29 PM on July 20, 2020: contributor

    ACK 55057ffc51697daafac1224664d5e3258ae0b116

    Good find.

    According to git blame the remaining version of this function was added in e7652d3 in Nov 2018.

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

    ACK 55057ffc51697daafac1224664d5e3258ae0b116

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

  13. theStack deleted the branch on Dec 1, 2020
  14. Fabcien referenced this in commit 67d8646457 on Sep 2, 2021
  15. bitcoin 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-05-20 06:54 UTC