mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-03-04 17:55:36 +01:00
Merge pull request #2319 from Roasbeef/chan-point-fix
rpcserver: ensure ChannelPoint is set in CloseChannel
This commit is contained in:
commit
f55e81a2d4
1 changed files with 6 additions and 0 deletions
|
@ -1394,6 +1394,12 @@ func getChanPointFundingTxid(chanPoint *lnrpc.ChannelPoint) ([]byte, error) {
|
|||
func (r *rpcServer) CloseChannel(in *lnrpc.CloseChannelRequest,
|
||||
updateStream lnrpc.Lightning_CloseChannelServer) error {
|
||||
|
||||
// If the user didn't specify a channel point, then we'll reject this
|
||||
// request all together.
|
||||
if in.GetChannelPoint() == nil {
|
||||
return fmt.Errorf("must specify channel point in close channel")
|
||||
}
|
||||
|
||||
force := in.Force
|
||||
index := in.ChannelPoint.OutputIndex
|
||||
txidHash, err := getChanPointFundingTxid(in.GetChannelPoint())
|
||||
|
|
Loading…
Add table
Reference in a new issue