graph/db: use route.Vertex for channel keys
Replace [33]byte with route.Vertex for NodeKey1Bytes, NodeKey2Bytes, BitcoinKey1Bytes, and BitcoinKey2Bytes in ChannelEdgeInfo. Since route.Vertex is defined as [33]byte, this change is functionally equivalent but provides better type safety and consistency with the rest of the routing subsystem. OtherNodeKeyBytes is also updated to return route.Vertex.
This commit is contained in:
2 files changed
+12
-11
No files matched your search
@@ -1262,9 +1262,9 @@ func (c *KVStore) addChannelEdge(tx kvdb.RwTx,
|
||||
|
||||
// Mark edge policies for both sides as unknown. This is to enable
|
||||
// efficient incoming channel lookup for a node.
|
||||
keys := []*[33]byte{
|
||||
&edge.NodeKey1Bytes,
|
||||
&edge.NodeKey2Bytes,
|
||||
keys := []route.Vertex{
|
||||
edge.NodeKey1Bytes,
|
||||
edge.NodeKey2Bytes,
|
||||
}
|
||||
for _, key := range keys {
|
||||
err := putChanEdgePolicyUnknown(edges, edge.ChannelID, key[:])
|
||||
|
||||
Reference in new issue
Block a user