5 Commits

Author SHA1 Message Date
Elle Mouton
9a220765fc
multi: convert ChanUpdate validate funcs to methods
In this commit, the ChannelUpdate message verification and validation
functions are moved from `routing` to methods on the ChannelUpdate
struct in `lnwire`.
2024-09-02 12:39:12 +02:00
Elle Mouton
74606701cf
multi: move ChanAnn validation to method in lnwire
Remove the ValidateChanAnn function from `routing` and instead add a
`Validate` method on the `ChannelAnnouncement1` itself.
2024-09-02 12:39:12 +02:00
Elle Mouton
7720aec8f1
multi: rename ChannelUpdate to ChannelUpdate1
In preparation for adding a new ChannelUpdate2 message and a
ChannelUpdate interface, we rename the existing message to
ChannelUpdate1.
2024-09-02 11:59:33 +02:00
Elle Mouton
0f0e436427
multi: rename ChannelAnnouncement to ChannelAnnouncment1
In preparation for adding the new ChannelAnnouncement2 message along
with a ChannelAnnouncement interface, we rename the existing message to
ChannelAnnouncement1.
2024-09-02 11:59:29 +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