peer: if cooperative closing transaction is rejected, return err to caller
This commit is contained in:
parent
03f9479eb4
commit
dc124baca1
6
peer.go
6
peer.go
@ -1638,12 +1638,16 @@ func (p *peer) handleClosingSigned(localReq *htlcswitch.ChanClose,
|
|||||||
if strings.Contains(err.Error(), "already exists") ||
|
if strings.Contains(err.Error(), "already exists") ||
|
||||||
strings.Contains(err.Error(), "already have") {
|
strings.Contains(err.Error(), "already have") {
|
||||||
peerLog.Infof("channel close tx from ChannelPoint(%v) "+
|
peerLog.Infof("channel close tx from ChannelPoint(%v) "+
|
||||||
" already exist, probably broadcasted by peer: %v",
|
" already exist, probably broadcast by peer: %v",
|
||||||
chanPoint, err)
|
chanPoint, err)
|
||||||
} else {
|
} else {
|
||||||
peerLog.Errorf("channel close tx from ChannelPoint(%v) "+
|
peerLog.Errorf("channel close tx from ChannelPoint(%v) "+
|
||||||
" rejected: %v", chanPoint, err)
|
" rejected: %v", chanPoint, err)
|
||||||
|
|
||||||
|
if localReq != nil {
|
||||||
|
localReq.Err <- err
|
||||||
|
}
|
||||||
|
|
||||||
// TODO(roasbeef): send ErrorGeneric to other side
|
// TODO(roasbeef): send ErrorGeneric to other side
|
||||||
return nil, 0
|
return nil, 0
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user