Commit Graph

9 Commits

Author SHA1 Message Date
ziggie
e19f891453
graph: add log lines for stop and start func. 2024-07-31 13:12:20 +02:00
yyforyongyu
d992cf94d6
multi: add SpewLogClosure to avoid code repetition 2024-07-25 22:18:49 +08:00
yyforyongyu
b6049ff94b
multi: add NewLogClosure in lnutils to avoid repetition
And replaces all usage of `logClosure` with `lnutils.LogClosure`.
2024-07-25 21:25:23 +08:00
Elle Mouton
90dff730ce
graph: updated builder to use atomic ints
Instead of relying on devs to remember that they must only be accessed
atomically.
2024-07-15 15:56:33 +02:00
Elle Mouton
fe34d62eb1
graph+routing: address linter errors
This is done in a separate commit so as to keep the original code-move
commit mostly a pure code move.
2024-07-15 15:56:33 +02:00
Elle Mouton
7f1be39d45
refactor: move various duties from ChannelRouter to graph.Builder
This commit is a large refactor that moves over various responsibilities
from the ChannelRouter to the graph.Builder. These include all graph
related tasks such as:
- graph pruning
- validation of new network updates & persisting new updates
- notifying topology update clients of any changes.

This is a large commit but:
- many of the files are purely moved from `routing` to `graph`
- the business logic put in the graph Builder is copied exactly as is
  from the ChannelRouter with one exception:
- The ChannelRouter just needs to be able to call the Builder's
  `ApplyChannelUpdate` method. So this is now exported and provided to
the ChannelRouter as a config option.
- The trickiest part was just moving over the test code since quite a
  bit had to be duplicated.
2024-07-15 15:56:33 +02:00
Elle Mouton
0b7364f54b
graph+server: add template for new graph Builder sub-system
This is preparation for an upcoming commit that will move over various
responsibilities from the ChannelRouter to the graph Builder. So that
that commit can be a pure code-move commit, the template for the new
sub-system is added up front here.
2024-07-15 15:56:33 +02:00
Elle Mouton
be84d6974e
channeldb: add a graph.DB interface
..which describes the database methods that are required for graph
maintaining and building.
2024-07-15 15:13:58 +02:00
Elle Mouton
c1d7a9d2e7
multi: move ChannelGraphSource interface
... to the new `graph` package in preparation for the implementation of
the interface being moved to this new package.
2024-07-15 15:13:58 +02:00