HomePhabricator

Add WriteHDKeypath function and move *HDKeypath to util/bip32.{h,cpp}

Authored by Andrew Chow <achow101-github@achow101.com> on Nov 6 2018, 14:23.

Description

Add WriteHDKeypath function and move *HDKeypath to util/bip32.{h,cpp}

Summary:
Creates new files util/bip32.h and util/bip32.cpp for containing
BIP 32 stuff.
Moves FormatKeyPath from descriptor.cpp to util/bip32.
Adds a wrapper around it to prepent the 'm' for when just the
BIP 32 style keypath is needed.

Partial backport of Core PR14021
https://github.com/bitcoin/bitcoin/pull/14021/commits/e7652d3f64212a6af68fc7d788411d28fcbdbd0a

Depends on D6004

Test Plan:

../configure --enable-deprecated-build-system
make check

ninja
ninja check
test_runner.py

Reviewers: O1 Bitcoin ABC, #bitcoin_abc, Fabien

Reviewed By: O1 Bitcoin ABC, #bitcoin_abc, Fabien

Subscribers: Fabien

Differential Revision: https://reviews.bitcoinabc.org/D6204

Details

Committed
nakihitoFri, May 22, 22:47
Pushed
nakihitoFri, May 22, 22:47
Reviewer
Restricted Owners Package
Differential Revision
D6204: Add WriteHDKeypath function and move *HDKeypath to util/bip32.{h,cpp}
Parents
rABCeb725bf601e3: Refactor keymetadata writing to a separate method
Branches
Unknown
Tags
Unknown