mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-04-11 05:29:11 +02:00
lnwallet: when handling possible channel breach, only log if contract breach
This commit is contained in:
parent
e56258917e
commit
4c9bd9dc54
@ -1157,12 +1157,6 @@ func (lc *LightningChannel) closeObserver(channelCloseNtfn *chainntnfs.SpendEven
|
||||
}
|
||||
lc.RUnlock()
|
||||
|
||||
lc.Lock()
|
||||
defer lc.Unlock()
|
||||
|
||||
walletLog.Warnf("Unprompted commitment broadcast for ChannelPoint(%v) "+
|
||||
"detected!", lc.channelState.ChanID)
|
||||
|
||||
// Otherwise, the remote party might have broadcast a prior revoked
|
||||
// state...!!!
|
||||
commitTxBroadcast := commitSpend.SpendingTx
|
||||
@ -1176,6 +1170,12 @@ func (lc *LightningChannel) closeObserver(channelCloseNtfn *chainntnfs.SpendEven
|
||||
return
|
||||
}
|
||||
|
||||
lc.Lock()
|
||||
defer lc.Unlock()
|
||||
|
||||
walletLog.Warnf("Unprompted commitment broadcast for ChannelPoint(%v) "+
|
||||
"detected!", lc.channelState.FundingOutpoint)
|
||||
|
||||
// Decode the state hint encoded within the commitment transaction to
|
||||
// determine if this is a revoked state or not.
|
||||
obsfucator := lc.stateHintObsfucator
|
||||
@ -1203,6 +1203,7 @@ func (lc *LightningChannel) closeObserver(channelCloseNtfn *chainntnfs.SpendEven
|
||||
// As we've detected that the channel has been closed,
|
||||
// immediately delete the state from disk, creating a close
|
||||
// summary for future usage by related sub-systems.
|
||||
//
|
||||
// TODO(roasbeef): include HTLC's
|
||||
// * and time-locked balance, NEED TO???
|
||||
closeSummary := channeldb.ChannelCloseSummary{
|
||||
|
Loading…
x
Reference in New Issue
Block a user