Closed feelancer21 closed 1 month ago
Yeah, those two RPCs don't seem to bubble up their changes to the main cfg
struct of the RPC server, which should be quite trivial to fix.
Hello ... I've just reproduced the bug ... Can I work on it?
Yeah, those two RPCs don't seem to bubble up their changes to the main
cfg
struct of the RPC server, which should be quite trivial to fix.
The DebugLevel on main cfg
can be updated at the end of the function 'DebugLevel'
On the other hand it seems that I can not access cfg
from the function [setCfg
] (https://github.com/lightningnetwork/lnd/blob/8adec8692ad2b8e1d1a4023c56ccc6db8ddcce76/cmd/commands/cmd_mission_control.go#L118)
Any Tip? Am I missing something?
You're looking in the wrong place, what you linked to is the Command Line Interface. You'll want to take a look at the server implementation here: https://github.com/lightningnetwork/lnd/blob/789c6bac8ca4b75d15e9e40f8ded8e394df518bb/lnrpc/routerrpc/router_server.go#L948 That then seems to call into this: https://github.com/lightningnetwork/lnd/blob/24080c51f9e37f7230f48b67c72b5da5f1fa6139/routing/missioncontrol.go#L292
Both places don't have access to the main cfg
, so it's probably a bit more involved to get things working here.
My suggestion would be to pass in a callback into MissionControl
that allows the root level config to be updated. That callback would then be set and implemented somewhere here: https://github.com/lightningnetwork/lnd/blob/eaa85920ea1dca750eaa31b6f23c161135df24b0/server.go#L927 where you have s.cfg
available.
ssionControl
that allows the root level config to be updated. That callback would then be set and implemented somewhere here:
DebugLevel was easy as expected ... done and tested but I'm struggling to understand how to implement, pass and call the callback function... it's a new concept to me ...
DebugLevel was easy as expected ... done and tested but I'm struggling to understand how to implement, pass and call the callback function... it's a new concept to me ...
I think a good example is UpdateForwardingPolicies
which is part of the switch. The channel manager updating the policies has only access to a function
The function is passed here to the manager.
DebugLevel was easy as expected ... done and tested but I'm struggling to understand how to implement, pass and call the callback function... it's a new concept to me ...
I think a good example is
UpdateForwardingPolicies
which is part of the switch. The channel manager updating the policies has only access to a functionThe function is passed here to the manager.
Thank you ... I'll take a look!
I used
lncli debuglevel
to change the debuglevel andlncli setmccfg
to change the estimator. In both cases the config under lncli getdebuginfo has not changed. It seems that only the config at the start time is displayed there and not the current state.