peer: filter borked channels when loading active chans

This commit is contained in:
Conner Fromknecht 2017-12-17 21:45:35 -08:00
parent 978c0dc512
commit 44805be8d9
No known key found for this signature in database
GPG Key ID: 39DE78FBE6ACB0EF
1 changed files with 6 additions and 0 deletions

View File

@ -318,6 +318,12 @@ func (p *peer) loadActiveChannels(chans []*channeldb.OpenChannel) error {
return fmt.Errorf("peer shutting down")
}
// Skip adding any permanently irreconcilable channels to the
// htlcswitch.
if dbChan.IsBorked {
continue
}
blockEpoch, err := p.server.cc.chainNotifier.RegisterBlockEpochNtfn()
if err != nil {
return err