mirror of
https://github.com/Qortal/altcoinj.git
synced 2025-02-12 10:15:52 +00:00
Fix key derivation
This commit is contained in:
parent
3dfaf54e28
commit
e2ebe69aae
@ -95,7 +95,7 @@ public class DeterministicHierarchy implements Serializable {
|
|||||||
throw new IllegalArgumentException(String.format("No key found for %s path %s.",
|
throw new IllegalArgumentException(String.format("No key found for %s path %s.",
|
||||||
relativePath ? "relative" : "absolute", HDUtils.formatPath(path)));
|
relativePath ? "relative" : "absolute", HDUtils.formatPath(path)));
|
||||||
checkArgument(absolutePath.size() > 0, "Can't derive the master key: nothing to derive from.");
|
checkArgument(absolutePath.size() > 0, "Can't derive the master key: nothing to derive from.");
|
||||||
DeterministicKey parent = get(absolutePath.subList(0, absolutePath.size() - 1), relativePath, true);
|
DeterministicKey parent = get(absolutePath.subList(0, absolutePath.size() - 1), false, true);
|
||||||
putKey(HDKeyDerivation.deriveChildKey(parent, absolutePath.get(absolutePath.size() - 1)));
|
putKey(HDKeyDerivation.deriveChildKey(parent, absolutePath.get(absolutePath.size() - 1)));
|
||||||
}
|
}
|
||||||
return keys.get(absolutePath);
|
return keys.get(absolutePath);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user