Merge pull request #1418 from halseth/channel-stop
[bugfix] Channel stop bugfixes
This commit is contained in:
commit
ce164a5233
@ -1616,9 +1616,7 @@ func (f *fundingManager) handleFundingSigned(fmsg *fundingSignedMsg) {
|
|||||||
fndgLog.Errorf("failed creating lnChannel: %v", err)
|
fndgLog.Errorf("failed creating lnChannel: %v", err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
defer func() {
|
defer lnChannel.Stop()
|
||||||
lnChannel.Stop()
|
|
||||||
}()
|
|
||||||
|
|
||||||
err = f.sendFundingLocked(completeChan, lnChannel, shortChanID)
|
err = f.sendFundingLocked(completeChan, lnChannel, shortChanID)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -1879,9 +1877,7 @@ func (f *fundingManager) handleFundingConfirmation(completeChan *channeldb.OpenC
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
defer func() {
|
defer lnChannel.Stop()
|
||||||
lnChannel.Stop()
|
|
||||||
}()
|
|
||||||
|
|
||||||
chanID := lnwire.NewChanIDFromOutPoint(&completeChan.FundingOutpoint)
|
chanID := lnwire.NewChanIDFromOutPoint(&completeChan.FundingOutpoint)
|
||||||
|
|
||||||
@ -2224,6 +2220,7 @@ func (f *fundingManager) handleFundingLocked(fmsg *fundingLockedMsg) {
|
|||||||
err = channel.InitNextRevocation(fmsg.msg.NextPerCommitmentPoint)
|
err = channel.InitNextRevocation(fmsg.msg.NextPerCommitmentPoint)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fndgLog.Errorf("unable to insert next commitment point: %v", err)
|
fndgLog.Errorf("unable to insert next commitment point: %v", err)
|
||||||
|
channel.Stop()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2249,6 +2246,7 @@ func (f *fundingManager) handleFundingLocked(fmsg *fundingLockedMsg) {
|
|||||||
peer, err := f.cfg.FindPeer(fmsg.peerAddress.IdentityKey)
|
peer, err := f.cfg.FindPeer(fmsg.peerAddress.IdentityKey)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fndgLog.Errorf("Unable to find peer: %v", err)
|
fndgLog.Errorf("Unable to find peer: %v", err)
|
||||||
|
channel.Stop()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
newChanDone := make(chan struct{})
|
newChanDone := make(chan struct{})
|
||||||
|
1
peer.go
1
peer.go
@ -314,7 +314,6 @@ func (p *peer) loadActiveChannels(chans []*channeldb.OpenChannel) error {
|
|||||||
p.server.cc.signer, p.server.witnessBeacon, dbChan,
|
p.server.cc.signer, p.server.witnessBeacon, dbChan,
|
||||||
)
|
)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
lnChan.Stop()
|
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user