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:
Oliver Gugger 2022-01-05 11:04:15 +01:00
parent 9da8333a6e
commit 1902ad724e
No known key found for this signature in database
GPG Key ID: 8E4256593F177720

View File

@ -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
// 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 {
// TODO(roasbeef): if regualr p2wkh, then at times
// internally we allow script to go by
return nil, fmt.Errorf("witness script MUST be " +
"specified")
}