Skip to content

Commit bba9ebc

Browse files
committed
Be consistent in use of multi-path vs multi-index
multi-path is the descriptor extension; multi-index is the index within a multi-path that is used for derivation/script generation.
1 parent 7edfa7e commit bba9ebc

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/bip32.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -899,7 +899,7 @@ int bip32_key_from_parent_path_str_n(const struct ext_key *hdkey,
899899
struct ext_key *key_out)
900900
{
901901
uint32_t path[BIP32_PATH_MAX_LEN], *path_p = path, features;
902-
const uint32_t multi_index = 0; /* Multi-index not supported */
902+
const uint32_t multi_index = 0; /* Multi-path not supported */
903903
size_t written;
904904
if (flags & BIP32_FLAG_STR_MULTIPATH)
905905
return WALLY_EINVAL; /* Multi-path is not supported for this call */

src/ctest/test_descriptor.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1853,7 +1853,7 @@ static const struct address_test {
18531853
"pkh([d34db33f/44'/0'/*]mainnet_xpub/1/*)",
18541854
WALLY_NETWORK_BITCOIN_MAINNET, 0, 0, 0, ADDR("")
18551855
}, {
1856-
"address errchk - key origin with multi-index",
1856+
"address errchk - key origin with multi-path",
18571857
"pkh([d34db33f/44'/0'/<0;1>]mainnet_xpub/1/*)",
18581858
WALLY_NETWORK_BITCOIN_MAINNET, 0, 0, 0, ADDR("")
18591859
}, {

src/test/test_bip32.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -548,16 +548,16 @@ def get_paths(path):
548548
('m/1', W, 1), # Non-zero wildcard given for non-wildcard path
549549
('/*', W, 2147483648), # Hardened wildcard
550550
('1', 0xff, 0), # Invalid flags
551-
('/1/<0;1>', 0, 0), # Multi-index present without flag
552-
('/1/<0;1>', M, 0)] # Multi-index flag present
551+
('/1/<0;1>', 0, 0), # Multi-path present without flag
552+
('/1/<0;1>', M, 0)] # Multi-path flag present
553553

554554
for path, flags, wildcard in cases:
555555
flags = flags | FLAG_KEY_PRIVATE
556556
ret = bip32_key_from_parent_path_str_n(m, path, len(path or ''),
557557
wildcard, flags, key_out)
558558
self.assertEqual(ret, WALLY_EINVAL)
559559
if flags == M:
560-
continue # Multi-index for bip32_path_from_str is tested below
560+
continue # Multi-path for bip32_path_from_str is tested below
561561
ret, written = bip32_path_from_str(path, wildcard, 0, flags,
562562
c_path, len(c_path))
563563
self.assertEqual((ret, written), (WALLY_EINVAL, 0))

0 commit comments

Comments
 (0)