mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-02-22 22:25:24 +01:00
rpcserver: add robustness check
This commit is contained in:
parent
79d0655a96
commit
d695383386
1 changed files with 8 additions and 0 deletions
|
@ -2736,6 +2736,14 @@ func (r *rpcServer) CloseChannel(in *lnrpc.CloseChannelRequest,
|
|||
return err
|
||||
}
|
||||
|
||||
// Safety check which should never happen.
|
||||
//
|
||||
// TODO(ziggie): remove pointer as return value from
|
||||
// ForceCloseContract.
|
||||
if closingTx == nil {
|
||||
return fmt.Errorf("force close transaction is nil")
|
||||
}
|
||||
|
||||
closingTxid := closingTx.TxHash()
|
||||
|
||||
// With the transaction broadcast, we send our first update to
|
||||
|
|
Loading…
Add table
Reference in a new issue