mirror of
https://github.com/aljazceru/breez-lnd.git
synced 2026-02-23 07:24:21 +01:00
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:
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 {
|
||||
|
||||
Reference in New Issue
Block a user