-
Notifications
You must be signed in to change notification settings - Fork 2.2k
htlcswitch+peer [2/2]: thread context through in preparation for passing to graph DB calls #9699
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Important Review skippedAuto reviews are limited to specific labels. 🏷️ Labels to auto review (1)
Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Both the `htlcswitch` and `peer` systems take a `FetchLastChanUpdate` call back which underneath will call the `graphBuilder`'s `GetChannelByID` method which calls the graph DB's `FetchChannelEdgeByID` method which will eventually take a context. A couple of `context.TODO()`s are added which will be removed in later commits.
which calls the `FetchLastChannelUpdate` call back.
In this commit we also derive fresh contexts and then call the `cancel` functions of those in the `Stop` methods of: - `InterceptableSwitch` - `Switch` This removes two previously added `context.TODO`s and introduces a few more.
and introduce one more.
And remove one context.TODO
Remove a context.TODO from `SendHTLC`.
Remove a context.TODO from `ResumeModified`.
closing for now. We'll just use |
Depends on #9691.
PR context
This is part of the last step required to complete #9494. We want all calls to the graph DB (and hence, ChannelGraph) to take a context since later, this context will be passed through to any remote graph RPC calls as well as any DB calls to a SQL graph backend.
This PR specifically: This is part 2 of a 2 part PR series that addresses the
htlcswitch
In this PR, we tackle the
htlcswitch
&peer
packages. This is split over 2 PRs since it is quite a lot. This PR is part 2. This package makes calls to the graph'sFetchLastChannelUpdate
call. So this PR is all aimed at threading contexts through to the call-sites of this call-back. It leaves 1context.TODO()
in the main LNDserver
which will be addressed in a follow up.Branch strategy:
This series of PRs is basically a big code refactor. So once 19 is shipped, we can merge any work that has been merged into
elle-graph
and from then on we can just merge into master.