lightning: zero keylocator means no fancy derivation, pass keydesc argument correctly
This commit is contained in:
parent
40005dc00d
commit
33318b12e0
@ -469,7 +469,7 @@ def SignOutputRaw(json):
|
|||||||
|
|
||||||
|
|
||||||
def signOutputRaw(tx, signDesc):
|
def signOutputRaw(tx, signDesc):
|
||||||
pri = derivePrivKey(signDesc)
|
pri = derivePrivKey(signDesc.keyDescriptor)
|
||||||
pri2 = maybeTweakPrivKey(signDesc, pri)
|
pri2 = maybeTweakPrivKey(signDesc, pri)
|
||||||
sig = rawTxInWitnessSignature(tx, signDesc.sigHashes, signDesc.inputIndex,
|
sig = rawTxInWitnessSignature(tx, signDesc.sigHashes, signDesc.inputIndex,
|
||||||
signDesc.output.value, signDesc.witnessScript, sigHashAll, pri2)
|
signDesc.output.value, signDesc.witnessScript, sigHashAll, pri2)
|
||||||
@ -543,7 +543,7 @@ def fetchPrivKey(str_address, keyLocatorFamily, keyLocatorIndex, privKey=None):
|
|||||||
else:
|
else:
|
||||||
ks = WALLET.keystore
|
ks = WALLET.keystore
|
||||||
|
|
||||||
if keyLocatorFamily is not None or keyLocatorIndex is not None:
|
if keyLocatorFamily != 0 or keyLocatorIndex != 0:
|
||||||
pri = ks.get_private_key([1017, keyLocatorFamily, keyLocatorIndex], password=None)[0]
|
pri = ks.get_private_key([1017, keyLocatorFamily, keyLocatorIndex], password=None)[0]
|
||||||
pri = EC_KEY(pri)
|
pri = EC_KEY(pri)
|
||||||
else:
|
else:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user