mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-02-23 22:46:40 +01:00
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. |
||
---|---|---|
.. | ||
db | ||
graphsession | ||
testdata | ||
builder.go | ||
builder_test.go | ||
errors.go | ||
interfaces.go | ||
log.go | ||
notifications.go | ||
notifications_test.go | ||
setup_test.go | ||
stats.go |