hd.
This commit is contained in:
parent
559cb62889
commit
370b5aeb24
@ -366,11 +366,12 @@ HD.parsePath = function parsePath(path, max) {
|
||||
if (max == null)
|
||||
max = constants.hd.MAX_INDEX;
|
||||
|
||||
if (constants.hd.PATH_ROOTS.indexOf(path) !== -1)
|
||||
return result;
|
||||
|
||||
if (constants.hd.PATH_ROOTS.indexOf(root) === -1)
|
||||
if (root !== 'm'
|
||||
&& root !== 'M'
|
||||
&& root !== 'm\''
|
||||
&& root !== 'M\'') {
|
||||
throw new Error('Bad path root.');
|
||||
}
|
||||
|
||||
for (i = 0; i < parts.length; i++) {
|
||||
index = parts[i];
|
||||
|
||||
@ -516,8 +516,7 @@ exports.hd = {
|
||||
HARDENED: 0x80000000,
|
||||
MAX_INDEX: 0x100000000,
|
||||
MIN_ENTROPY: 128 / 8,
|
||||
MAX_ENTROPY: 512 / 8,
|
||||
PATH_ROOTS: ['m', 'M', 'm\'', 'M\'']
|
||||
MAX_ENTROPY: 512 / 8
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Loading…
Reference in New Issue
Block a user