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.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
|
// Otherwise, the remote party might have broadcast a prior revoked
|
||||||
// state...!!!
|
// state...!!!
|
||||||
commitTxBroadcast := commitSpend.SpendingTx
|
commitTxBroadcast := commitSpend.SpendingTx
|
||||||
@ -1176,6 +1170,12 @@ func (lc *LightningChannel) closeObserver(channelCloseNtfn *chainntnfs.SpendEven
|
|||||||
return
|
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
|
// Decode the state hint encoded within the commitment transaction to
|
||||||
// determine if this is a revoked state or not.
|
// determine if this is a revoked state or not.
|
||||||
obsfucator := lc.stateHintObsfucator
|
obsfucator := lc.stateHintObsfucator
|
||||||
@ -1203,6 +1203,7 @@ func (lc *LightningChannel) closeObserver(channelCloseNtfn *chainntnfs.SpendEven
|
|||||||
// As we've detected that the channel has been closed,
|
// As we've detected that the channel has been closed,
|
||||||
// immediately delete the state from disk, creating a close
|
// immediately delete the state from disk, creating a close
|
||||||
// summary for future usage by related sub-systems.
|
// summary for future usage by related sub-systems.
|
||||||
|
//
|
||||||
// TODO(roasbeef): include HTLC's
|
// TODO(roasbeef): include HTLC's
|
||||||
// * and time-locked balance, NEED TO???
|
// * and time-locked balance, NEED TO???
|
||||||
closeSummary := channeldb.ChannelCloseSummary{
|
closeSummary := channeldb.ChannelCloseSummary{
|
||||||
|
Loading…
Reference in New Issue
Block a user