mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-03-26 17:52:25 +01: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:
parent
9da8333a6e
commit
1902ad724e
@ -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")
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user