Add safe read/write to route map (#1760)

This commit is contained in:
Carlos Hernandez
2024-04-11 14:12:23 -06:00
committed by GitHub
parent 061f673a4f
commit 76702c8a09
6 changed files with 49 additions and 11 deletions

View File

@ -718,7 +718,7 @@ func toProtoFullStatus(fullStatus peer.FullStatus) *proto.FullStatus {
BytesRx: peerState.BytesRx,
BytesTx: peerState.BytesTx,
RosenpassEnabled: peerState.RosenpassEnabled,
Routes: maps.Keys(peerState.Routes),
Routes: maps.Keys(peerState.GetRoutes()),
Latency: durationpb.New(peerState.Latency),
}
pbFullStatus.Peers = append(pbFullStatus.Peers, pbPeerState)