mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-02-22 22:25:24 +01:00
lnd: reject custom fee when force closing channel
This commit is contained in:
parent
4247ee20b3
commit
fcaf8c029b
1 changed files with 6 additions and 0 deletions
|
@ -1674,6 +1674,12 @@ func (r *rpcServer) CloseChannel(in *lnrpc.CloseChannelRequest,
|
|||
return fmt.Errorf("must specify channel point in close channel")
|
||||
}
|
||||
|
||||
// If force closing a channel, the fee set in the commitment transaction
|
||||
// is used.
|
||||
if in.Force && (in.SatPerByte != 0 || in.TargetConf != 0) {
|
||||
return fmt.Errorf("force closing a channel uses a pre-defined fee")
|
||||
}
|
||||
|
||||
force := in.Force
|
||||
index := in.ChannelPoint.OutputIndex
|
||||
txid, err := GetChanPointFundingTxid(in.GetChannelPoint())
|
||||
|
|
Loading…
Add table
Reference in a new issue