[bug]: `lncli getdebuginfo` not showing the current state of config
feelancer21 opened this issue ยท 8 comments
I used lncli debuglevel
to change the debuglevel and lncli 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.
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:
lnd/lnrpc/routerrpc/router_server.go
Line 948 in 789c6ba
That then seems to call into this:
Line 292 in 24080c5
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:
Line 927 in eaa8592
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
lnd/routing/localchans/manager.go
Lines 21 to 25 in 68494fd
The function is passed here to the manager.
Lines 1045 to 1050 in 68494fd
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 functionlnd/routing/localchans/manager.go
Lines 21 to 25 in 68494fd
The function is passed here to the manager.
Lines 1045 to 1050 in 68494fd
Thank you ... I'll take a look!
Hello @guggero and @feelancer21 this PR fixes the debuglevel updating but the estimator updating (callback function) is not working. Might be something basic that I'm missing ... Any help would be welcome!