fix issue of including parent path elements in deterministic key when deriving child xpub from an output descriptor containing more than two child path elements
This commit is contained in:
parent
13e1fafbe8
commit
e1f2ce41ad
@ -449,7 +449,8 @@ public class OutputDescriptor {
|
||||
keyDerivation = keyDerivation.extend(childPath);
|
||||
childPath.addFirst(extendedKey.getKeyChildNumber());
|
||||
DeterministicKey derivedKey = extendedKey.getKey(childPath);
|
||||
extendedKey = new ExtendedKey(derivedKey, derivedKey.getParentFingerprint(), childPath.getLast());
|
||||
DeterministicKey pubKey = new DeterministicKey(List.of(derivedKey.getPath().getLast()), derivedKey.getChainCode(), derivedKey.getPubKey(), derivedKey.getDepth(), derivedKey.getParentFingerprint());
|
||||
extendedKey = new ExtendedKey(pubKey, pubKey.getParentFingerprint(), childPath.getLast());
|
||||
}
|
||||
} catch(Exception e) {
|
||||
//ignore and continue
|
||||
|
||||
Loading…
Reference in New Issue
Block a user