Skip to content

Commit

Permalink
Merge pull request #55 from subspace/update-geolite-db
Browse files Browse the repository at this point in the history
Update geo ip db
  • Loading branch information
i1i1 committed Apr 5, 2023
2 parents afad7e0 + e261976 commit 100db8a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions backend/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified backend/telemetry_core/src/GeoLite2-City.mmdb
Binary file not shown.
4 changes: 2 additions & 2 deletions backend/telemetry_core/src/find_location.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ pub struct Locator {
}

impl Locator {
/// taken from here: https://github.com/P3TERX/GeoLite.mmdb/releases/tag/2022.06.07
/// taken from here: https://github.com/P3TERX/GeoLite.mmdb/releases/tag/2023.04.04
const CITY_DATA: &'static [u8] = include_bytes!("GeoLite2-City.mmdb");

pub fn new(cache: FxHashMap<IpAddr, Arc<NodeLocation>>) -> Self {
Expand Down Expand Up @@ -86,6 +86,6 @@ mod tests {
fn locate_random_ip() {
let ip = "12.5.56.25".parse().unwrap();
let node_location = Locator::new(Default::default()).locate(ip).unwrap();
assert_eq!(&*node_location.city, "El Paso");
assert_eq!(&*node_location.city, "Victoria");
}
}

0 comments on commit 100db8a

Please sign in to comment.