breacharbiter: mark channel as fully closed after retribution enacted

This commit is contained in:
Olaoluwa Osuntokun 2017-05-04 16:10:46 -07:00
parent 27329ed9db
commit 4609bd462f
No known key found for this signature in database
GPG Key ID: 9CC5B105D03521A2
1 changed files with 6 additions and 0 deletions

View File

@ -326,6 +326,12 @@ func (b *breachArbiter) exactRetribution(confChan *chainntnfs.ConfirmationEvent,
"have been claimed", breachInfo.chanPoint,
revokedFunds, totalFunds)
// With the channel closed, mark it in the database as such.
err := b.db.MarkChanFullyClosed(&breachInfo.chanPoint)
if err != nil {
brarLog.Errorf("unable to mark chan as closed: %v", err)
}
// TODO(roasbeef): add peer to blacklist?
// TODO(roasbeef): close other active channels with offending peer