mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-09-19 12:01:27 +02:00
multi: add bool param to channel enable/disable methods
Add a new boolean parameter without changing any existing functionality. The parameter will be used to indicate whether a request to update a channel's status was made manually by a user (currently always false).
This commit is contained in:
@@ -2285,7 +2285,7 @@ func (p *Brontide) reenableActiveChannels() {
|
||||
// disabled bit to false and send out a new ChannelUpdate. If this
|
||||
// channel is already active, the update won't be sent.
|
||||
for _, chanPoint := range activePublicChans {
|
||||
err := p.cfg.ChanStatusMgr.RequestEnable(chanPoint)
|
||||
err := p.cfg.ChanStatusMgr.RequestEnable(chanPoint, false)
|
||||
if err != nil {
|
||||
peerLog.Errorf("Unable to enable channel %v: %v",
|
||||
chanPoint, err)
|
||||
@@ -2360,7 +2360,9 @@ func (p *Brontide) fetchActiveChanCloser(chanID lnwire.ChannelID) (
|
||||
Channel: channel,
|
||||
UnregisterChannel: p.cfg.Switch.RemoveLink,
|
||||
BroadcastTx: p.cfg.Wallet.PublishTransaction,
|
||||
DisableChannel: p.cfg.ChanStatusMgr.RequestDisable,
|
||||
DisableChannel: func(chanPoint wire.OutPoint) error {
|
||||
return p.cfg.ChanStatusMgr.RequestDisable(chanPoint, false)
|
||||
},
|
||||
Disconnect: func() error {
|
||||
return p.cfg.DisconnectPeer(p.IdentityKey())
|
||||
},
|
||||
@@ -2476,7 +2478,9 @@ func (p *Brontide) handleLocalCloseReq(req *htlcswitch.ChanClose) {
|
||||
Channel: channel,
|
||||
UnregisterChannel: p.cfg.Switch.RemoveLink,
|
||||
BroadcastTx: p.cfg.Wallet.PublishTransaction,
|
||||
DisableChannel: p.cfg.ChanStatusMgr.RequestDisable,
|
||||
DisableChannel: func(chanPoint wire.OutPoint) error {
|
||||
return p.cfg.ChanStatusMgr.RequestDisable(chanPoint, false)
|
||||
},
|
||||
Disconnect: func() error {
|
||||
return p.cfg.DisconnectPeer(p.IdentityKey())
|
||||
},
|
||||
|
Reference in New Issue
Block a user