mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-04-10 04:59:06 +02:00
rpcserver: add robustness check
This commit is contained in:
parent
5486f32444
commit
ed6a246439
@ -2739,6 +2739,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