mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-08-29 23:21:12 +02:00
signrpc: remove incomplete sentence and TODO
We use SignOutputRaw which expects a witness script being set, even for P2WKH. There is a special case in SignOutputRaw for the case where the script is a p2wkh script, then the input script is reconstructed correctly for the sighash.
This commit is contained in:
@@ -310,9 +310,12 @@ func (s *Server) SignOutputRaw(ctx context.Context, in *SignReq) (*SignResp,
|
|||||||
|
|
||||||
// If a witness script isn't passed, then we can't proceed, as
|
// If a witness script isn't passed, then we can't proceed, as
|
||||||
// in the p2wsh case, we can't properly generate the sighash.
|
// in the p2wsh case, we can't properly generate the sighash.
|
||||||
|
// A P2WKH doesn't need a witness script. But SignOutputRaw
|
||||||
|
// still needs to know the PK script that was used for the
|
||||||
|
// output. We'll send it in the WitnessScript field, the
|
||||||
|
// SignOutputRaw RPC will know what to do with it when creating
|
||||||
|
// the sighash.
|
||||||
if len(signDesc.WitnessScript) == 0 {
|
if len(signDesc.WitnessScript) == 0 {
|
||||||
// TODO(roasbeef): if regualr p2wkh, then at times
|
|
||||||
// internally we allow script to go by
|
|
||||||
return nil, fmt.Errorf("witness script MUST be " +
|
return nil, fmt.Errorf("witness script MUST be " +
|
||||||
"specified")
|
"specified")
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user