graph/db: let GraghCache.AddChannel take CachedEdgeInfo

Define a new CachedEdgeInfo type and let the graph cache's AddChannel
use this. This will let us later on (for the SQL impl of the graph db)
only load from the DB what we actually need for the graph cache.
This commit is contained in:
Elle Mouton committed 2025-06-10 20:10:35 +02:00
1 parent 3ea86bfbf4
commit 3069a67b62
4 files changed
+38 -5

No files matched your search

+1 -1
View File
@@ -61,7 +61,7 @@ func TestGraphCacheAddNode(t *testing.T) {
}
cache := NewGraphCache(10)
cache.AddNodeFeatures(nodeA, lnwire.EmptyFeatureVector())
cache.AddChannel(&models.ChannelEdgeInfo{
cache.AddChannel(&models.CachedEdgeInfo{
ChannelID: 1000,
// Those are direction independent!
NodeKey1Bytes: pubKey1,