-
Notifications
You must be signed in to change notification settings - Fork 236
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
4 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,6 @@ | ||
// Copyright 2023 - Nym Technologies SA <[email protected]> | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
use nym_client_core::client::topology_control::geo_aware_provider::{ | ||
CountryGroup, GeoAwareTopologyProvider, | ||
}; | ||
use nym_client_core::config::GroupBy; | ||
use nym_sdk::mixnet; | ||
use nym_sdk::mixnet::MixnetMessageSender; | ||
|
||
|
@@ -15,13 +11,13 @@ async fn main() { | |
let nym_api = "https://validator.nymtech.net/api/".parse().unwrap(); | ||
|
||
// We can group on something which is to a first approximation a continent. | ||
let group_by = GroupBy::CountryGroup(CountryGroup::Europe); | ||
let group_by = mixnet::GroupBy::CountryGroup(mixnet::CountryGroup::Europe); | ||
|
||
// ... or on a nym-address. This means we use the geo location of the gateway that the | ||
// nym-address is connected to. | ||
//let group_by = GroupBy::NymAddress("id.enc@gateway".parse().unwrap()); | ||
|
||
let geo_topology_provider = GeoAwareTopologyProvider::new( | ||
let geo_topology_provider = mixnet::GeoAwareTopologyProvider::new( | ||
vec![nym_api], | ||
// We filter on the version of the mixnodes. Be prepared to manually update | ||
// this to keep this example working, as we can't (currently) fetch to current | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters