rpcserver: add robustness check
This commit is contained in:
1 file changed
+8
@@ -2739,6 +2739,14 @@ func (r *rpcServer) CloseChannel(in *lnrpc.CloseChannelRequest,
|
|||||||
return err
|
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()
|
closingTxid := closingTx.TxHash()
|
||||||
|
|
||||||
// With the transaction broadcast, we send our first update to
|
// With the transaction broadcast, we send our first update to
|
||||||
|
|||||||
Reference in new issue
Block a user