graph/db: version ChannelID lookup

Add a gossip version parameter to the ChannelID method (outpoint to
short channel ID lookup) in the Store interface and both KV/SQL
implementations. Update the VersionedGraph wrapper and tests.
This commit is contained in:
Elle Mouton committed 2026-02-20 09:19:22 +02:00
1 parent 2f6cc185a7
commit 28fe3585ac
5 files changed
+26 -9

No files matched your search

+2 -1
View File
@@ -239,7 +239,8 @@ type Store interface { //nolint:interfacebloat
// ChannelID attempt to lookup the 8-byte compact channel ID which maps
// to the passed channel point (outpoint). If the passed channel doesn't
// exist within the database, then ErrEdgeNotFound is returned.
ChannelID(chanPoint *wire.OutPoint) (uint64, error)
ChannelID(v lnwire.GossipVersion,
chanPoint *wire.OutPoint) (uint64, error)
// HighestChanID returns the "highest" known channel ID in the channel
// graph. This represents the "newest" channel from the PoV of the