mirror of
https://github.com/pezkuwichain/pezkuwi-telemetry.git
synced 2026-06-12 16:51:02 +00:00
Update GeoLite database (#583)
* Update GeoLite database * fmt and fix test --------- Co-authored-by: Milos Kriz <milos_kriz@hotmail.com> Co-authored-by: Milos Kriz <82968568+miloskriz@users.noreply.github.com>
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 68 MiB After Width: | Height: | Size: 55 MiB |
@@ -81,13 +81,15 @@ struct Locator {
|
||||
}
|
||||
|
||||
impl Locator {
|
||||
/// GeoLite database release data: 2023-10-13
|
||||
///
|
||||
/// GeoLite database release data: 2024-03-29
|
||||
/// Database and Contents Copyright (c) 2024 MaxMind, Inc.
|
||||
/// To download the latest version visit: https://dev.maxmind.com/geoip/geolite2-free-geolocation-data.
|
||||
///
|
||||
/// This database incorporates GeoNames [https://www.geonames.org] geographical data, which is made available
|
||||
/// under the Creative Commons Attribution 4.0 License.
|
||||
/// To view a copy of this license,visit https://creativecommons.org/licenses/by/4.0/.
|
||||
/// Use of this MaxMind product is governed by MaxMind's GeoLite2 End User License Agreement,
|
||||
/// which can be viewed at https://www.maxmind.com/en/geolite2/eula.
|
||||
/// This database incorporates GeoNames [https://www.geonames.org] geographical data,
|
||||
/// which is made available under the Creative Commons Attribution 4.0 License.
|
||||
/// To view a copy of this license, visit https://creativecommons.org/licenses/by/4.0/.
|
||||
const CITY_DATA: &'static [u8] = include_bytes!("GeoLite2-City.mmdb");
|
||||
|
||||
pub fn new(cache: FxHashMap<IpAddr, Arc<NodeLocation>>) -> Self {
|
||||
@@ -144,6 +146,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, "Riverside");
|
||||
assert_eq!(&*node_location.city, "Gardena");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user