Store relay states in a slice for consistent ordering (#1422)

This commit is contained in:
brad-defined
2025-06-24 12:04:00 -04:00
committed by GitHub
parent 9877648da9
commit a1498ca8f8
5 changed files with 48 additions and 13 deletions

View File

@@ -66,7 +66,7 @@ func TestControl_GetHostInfoByVpnIp(t *testing.T) {
localIndexId: 201,
vpnIp: vpnIp,
relayState: RelayState{
relays: map[netip.Addr]struct{}{},
relays: nil,
relayForByIp: map[netip.Addr]*Relay{},
relayForByIdx: map[uint32]*Relay{},
},
@@ -85,7 +85,7 @@ func TestControl_GetHostInfoByVpnIp(t *testing.T) {
localIndexId: 201,
vpnIp: vpnIp2,
relayState: RelayState{
relays: map[netip.Addr]struct{}{},
relays: nil,
relayForByIp: map[netip.Addr]*Relay{},
relayForByIdx: map[uint32]*Relay{},
},