mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-11-26 22:17:51 +01:00
routerrpc: expose SetChannel* methods from Router backend
Allow router RPC requests to call into the ChanStatusManager to manually update channel state.
This commit is contained in:
@@ -602,6 +602,13 @@ func newRPCServer(cfg *Config, s *server, macService *macaroons.Service,
|
||||
DefaultFinalCltvDelta: uint16(cfg.Bitcoin.TimeLockDelta),
|
||||
SubscribeHtlcEvents: s.htlcNotifier.SubscribeHtlcEvents,
|
||||
InterceptableForwarder: s.interceptableSwitch,
|
||||
SetChannelEnabled: func(outpoint wire.OutPoint) error {
|
||||
return s.chanStatusMgr.RequestEnable(outpoint, true)
|
||||
},
|
||||
SetChannelDisabled: func(outpoint wire.OutPoint) error {
|
||||
return s.chanStatusMgr.RequestDisable(outpoint, true)
|
||||
},
|
||||
SetChannelAuto: s.chanStatusMgr.RequestAuto,
|
||||
}
|
||||
|
||||
genInvoiceFeatures := func() *lnwire.FeatureVector {
|
||||
|
||||
Reference in New Issue
Block a user