multi: add version to models.ChannelEdgeInfo
And set it to V1 version everywhere. Add a Version field to ChannelEdgeInfo to distinguish between v1 and v2 channel announcements. Set it to GossipVersion1 for all existing channels. Both KV and SQL stores now validate that only v1 channels are currently supported, returning an error for v2 channels. The KV store automatically sets version to v1 when deserializing (since all persisted channels in KV format are v1). This versioning is essential for handling the different field requirements and validation logic between v1 and v2 channels.
This commit is contained in:
18 files changed
+64
-1
No files matched your search
@@ -493,6 +493,7 @@ func (d *testDBGraph) addRandChannel(node1, node2 *btcec.PublicKey,
|
||||
|
||||
chanID := randChanID()
|
||||
edge := &models.ChannelEdgeInfo{
|
||||
Version: lnwire.GossipVersion1,
|
||||
ChannelID: chanID.ToUint64(),
|
||||
Capacity: capacity,
|
||||
Features: lnwire.EmptyFeatureVector(),
|
||||
|
||||
Reference in new issue
Block a user