mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-11-13 07:37:22 +01:00
server+peer: rename disableChannel->announceChanStatus
Now takes a boolean whether to disable/activate, and keeps track of the last update sent to avoid sending duplicates.
This commit is contained in:
14
peer.go
14
peer.go
@@ -1690,8 +1690,11 @@ func (p *peer) fetchActiveChanCloser(chanID lnwire.ChannelID) (*channelCloser, e
|
||||
channel: channel,
|
||||
unregisterChannel: p.server.htlcSwitch.RemoveLink,
|
||||
broadcastTx: p.server.cc.wallet.PublishTransaction,
|
||||
disableChannel: p.server.disableChannel,
|
||||
quit: p.quit,
|
||||
disableChannel: func(op wire.OutPoint) error {
|
||||
return p.server.announceChanStatus(op,
|
||||
true)
|
||||
},
|
||||
quit: p.quit,
|
||||
},
|
||||
deliveryAddr,
|
||||
feePerKw,
|
||||
@@ -1750,8 +1753,11 @@ func (p *peer) handleLocalCloseReq(req *htlcswitch.ChanClose) {
|
||||
channel: channel,
|
||||
unregisterChannel: p.server.htlcSwitch.RemoveLink,
|
||||
broadcastTx: p.server.cc.wallet.PublishTransaction,
|
||||
disableChannel: p.server.disableChannel,
|
||||
quit: p.quit,
|
||||
disableChannel: func(op wire.OutPoint) error {
|
||||
return p.server.announceChanStatus(op,
|
||||
true)
|
||||
},
|
||||
quit: p.quit,
|
||||
},
|
||||
deliveryAddr,
|
||||
req.TargetFeePerKw,
|
||||
|
||||
Reference in New Issue
Block a user