peer: filter borked channels when loading active chans

This commit is contained in:
Conner Fromknecht committed 2018-01-05 13:47:18 -08:00
1 parent 978c0dc512
commit 44805be8d9
1 file changed
+6
+6
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