From 90008386d8630fba0cac1d881bf7dc0f41470526 Mon Sep 17 00:00:00 2001 From: Yaacov Akiba Slama Date: Sun, 9 Feb 2020 10:55:50 +0200 Subject: [PATCH] Copy InputIndex into the underlying SignDescriptor struct When the InputIndex is not 0, the index is not currently copied into the underlying SignDescriptor structure and the siganture generated is not valid. --- lnrpc/signrpc/signer_server.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lnrpc/signrpc/signer_server.go b/lnrpc/signrpc/signer_server.go index b3da2f938..e51fe5d00 100644 --- a/lnrpc/signrpc/signer_server.go +++ b/lnrpc/signrpc/signer_server.go @@ -373,8 +373,9 @@ func (s *Server) ComputeInputScript(ctx context.Context, Value: signDesc.Output.Value, PkScript: signDesc.Output.PkScript, }, - HashType: txscript.SigHashType(signDesc.Sighash), - SigHashes: sigHashCache, + HashType: txscript.SigHashType(signDesc.Sighash), + SigHashes: sigHashCache, + InputIndex: int(signDesc.InputIndex), }) }