peer: always load active channels upon connection reestablishment with peer
In this commit, we modify the logic within loadActiveChannels to *always* load a channel, even if it isn’t yet fully confirmed. With this change, we ensure that we’ll always send a channel_reestablish message upon reconnection. Fixes #458.
This commit is contained in:
parent
7b10f54216
commit
084d477ec3
6
peer.go
6
peer.go
@ -294,12 +294,6 @@ func (p *peer) Start() error {
|
||||
// channels returned by the database.
|
||||
func (p *peer) loadActiveChannels(chans []*channeldb.OpenChannel) error {
|
||||
for _, dbChan := range chans {
|
||||
// If the channel isn't yet open, then we don't need to process
|
||||
// it any further.
|
||||
if dbChan.IsPending {
|
||||
continue
|
||||
}
|
||||
|
||||
lnChan, err := lnwallet.NewLightningChannel(p.server.cc.signer,
|
||||
p.server.cc.chainNotifier, p.server.cc.feeEstimator, dbChan)
|
||||
if err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user