mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-06-01 18:50:09 +02:00
rpcserver: add robustness check
This commit is contained in:
parent
79d0655a96
commit
d695383386
@ -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…
x
Reference in New Issue
Block a user