mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-06-03 11:39:52 +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
|
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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user