graph/db: version highest chan id
Add a gossip version parameter to HighestChanID in the Store interface and both KV/SQL implementations. Update callers in the discovery ChanSeries and server bootstrap code.
This commit is contained in:
7 files changed
+49
-39
No files matched your search
+9
-2
@@ -688,8 +688,10 @@ func (c *ChannelGraph) AddEdgeProof(chanID lnwire.ShortChannelID,
|
||||
}
|
||||
|
||||
// HighestChanID returns the "highest" known channel ID in the channel graph.
|
||||
func (c *ChannelGraph) HighestChanID(ctx context.Context) (uint64, error) {
|
||||
return c.db.HighestChanID(ctx)
|
||||
func (c *ChannelGraph) HighestChanID(ctx context.Context,
|
||||
v lnwire.GossipVersion) (uint64, error) {
|
||||
|
||||
return c.db.HighestChanID(ctx, v)
|
||||
}
|
||||
|
||||
// ChanUpdatesInHorizon returns all known channel edges with updates in the
|
||||
@@ -950,6 +952,11 @@ func (c *VersionedGraph) DisabledChannelIDs() ([]uint64, error) {
|
||||
return c.db.DisabledChannelIDs(c.v)
|
||||
}
|
||||
|
||||
// HighestChanID returns the "highest" known channel ID in the channel graph.
|
||||
func (c *VersionedGraph) HighestChanID(ctx context.Context) (uint64, error) {
|
||||
return c.db.HighestChanID(ctx, c.v)
|
||||
}
|
||||
|
||||
// ChannelID attempts to lookup the 8-byte compact channel ID.
|
||||
func (c *VersionedGraph) ChannelID(chanPoint *wire.OutPoint) (uint64, error) {
|
||||
return c.db.ChannelID(c.v, chanPoint)
|
||||
|
||||
Reference in new issue
Block a user