graph/db: move cache read checks to ChannelGraph.
This commit moves the graph cache checks for FetchNodeFeatures, ForEachNodeDirectedChannel, GraphSession and ForEachNodeCached from the KVStore to the ChannelGraph. Since the ChannelGraph is currently just a pass-through for any of the KVStore methods, all that needs to be done for calls to go via the ChannelGraph instead directly to the KVStore is for the ChannelGraph to go and implement those methods.
This commit is contained in:
3 files changed
+68
-30
No files matched your search
@@ -3953,7 +3953,7 @@ func TestGraphCacheForEachNodeChannel(t *testing.T) {
|
||||
|
||||
getSingleChannel := func() *DirectedChannel {
|
||||
var ch *DirectedChannel
|
||||
err = graph.forEachNodeDirectedChannel(nil, node1.PubKeyBytes,
|
||||
err = graph.ForEachNodeDirectedChannel(node1.PubKeyBytes,
|
||||
func(c *DirectedChannel) error {
|
||||
require.Nil(t, ch)
|
||||
ch = c
|
||||
|
||||
Reference in new issue
Block a user