Open MPins opened 1 week ago
[!IMPORTANT]
Review skipped
Auto reviews are limited to specific labels.
Labels to auto review (1)
* llm-reviewPlease check the settings in the CodeRabbit UI or the
.coderabbit.yaml
file in this repository. To trigger a single review, invoke the@coderabbitai review
command.You can disable this status message by setting the
reviews.review_status
tofalse
in the CodeRabbit configuration file.
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Nice work @MPins. I left a few comments.
Also, I don't think this commit is necessary since all you did was add comments.
Nice work @MPins. I left a few comments.
Also, I don't think this commit is necessary since all you did was add comments
Thank you! ... About this last comment ... That's weird ... because I've added the line containing 'cfg.UpdateEstimatorValue(cfg.Estimator)' also
Hello everyone, the code is working as expected! But the changes made with lncli setmccfg
are not impacting the information we get from lncli getdebuginfo
. It looks like the GetDebugInfo function is getting this information from somewhere else.
https://github.com/lightningnetwork/lnd/blob/71ba355d903f01990718866c358c2ccac9402891/rpcserver.go#L3164
~So
GetDebugInfo
is getting its info from a different config from the one that you are updating (r.cfg
) https://github.com/lightningnetwork/lnd/blob/b67af4a7061f5d14e0f537b8073afa3101d8d16b/rpcserver.go#L3166You would have to change it to
r.server.cfg
to get the updated one.Then maybe change this from
r.cfg.LogWriter
tor.server.cfg.LogWriter
so that all the config updates can be in one place: https://github.com/lightningnetwork/lnd/blob/b67af4a7061f5d14e0f537b8073afa3101d8d16b/rpcserver.go#L6901I think maybe the config field in the
rpcserver
struct should be removed entirely since we can access config from theserver
field but I would like hear what other ppl think about it~
Edit:
Please ignore my earlier comments on this, it should work either ways if you are using r.cfg
or r.server.cfg
as they have same memory address. I think once you fix the pointer thing here it should work https://github.com/lightningnetwork/lnd/pull/8857#discussion_r1663641513
Fixes #8793
modified: rpcserver.go modified: server.go modified: routing/missioncontrol.go
Change Description
Changed the DebugLevel function to start updating the main cfg DebugLevel variable.
Created the function UpdateEstimatorValue to just update the main cfg estimator value, this function is a callback function when we call NewMissionControl when creating a new server on server.go. And finally, call the callback function on SetConfig on routing/missioncontrol.go
IMPORTANT the estimator value part is not working, for sure I missed something !!! Any Help is welcome !!!
Steps to Test
After running LND with the wallet unlcoked, send the lncli commands to change the debuglevel and estimator and check if they are updated unsing 'getdebuginfo'.
Pull Request Checklist
Testing
Code Style and Documentation
[skip ci]
in the commit message for small changes.📝 Please see our Contribution Guidelines for further guidance.