lnd/graph
Elle Mouton 14cedef58e
graph/db: add NodeRTx interface and implement it
In this commit, a new NodeRTx interface is added which represents
consistent access to a persisted models.LightningNode. The
ForEachChannel method of the interface gives the caller access to the
node's channels under the same read transaction (if any) that was used
to fetch the node in the first place. The FetchNode method returns
another NodeRTx which again will have the same underlying read
transaction.

The main point of this interface is to provide this consistent access
without needing to expose the `kvdb.RTx` type as a method parameter.
This will then make it much easier in future to add new implementations
of this interface that are backed by other databases (or RPC
connections) where the `kvdb.RTx` type does not apply.

We will make use of the new interface in the `autopilot` package in
upcoming commits in order to remove the `autopilot`'s dependence on the
pointer to the `*graphdb.ChannelGraph` which it has today.
2025-02-10 08:23:58 +02:00
..
db graph/db: add NodeRTx interface and implement it 2025-02-10 08:23:58 +02:00
graphsession refactor: move graphsession pkg to graph package 2024-11-28 13:36:15 +02:00
testdata refactor: move various duties from ChannelRouter to graph.Builder 2024-07-15 15:56:33 +02:00
builder.go graph: remove unused ForEachNode method from Builder 2025-02-10 08:16:34 +02:00
builder_test.go multi: move LightningNode struct to models package 2024-11-28 13:36:32 +02:00
errors.go graph -> discovery: move ValidationBarrier to discovery 2025-01-23 13:04:39 -05:00
interfaces.go graph: remove unused ForEachNode method from Builder 2025-02-10 08:16:34 +02:00
log.go multi: start updating various loggers to use the new v2 type 2024-10-22 17:03:55 +02:00
notifications.go multi: move LightningNode struct to models package 2024-11-28 13:36:32 +02:00
notifications_test.go multi: fix linter errors 2024-11-28 13:51:15 +02:00
setup_test.go refactor: move various duties from ChannelRouter to graph.Builder 2024-07-15 15:56:33 +02:00
stats.go graph: rename routerStats to builderStats 2025-02-07 13:01:39 +02:00