Node icon indicating copy to clipboard operation
Node copied to clipboard

Free World Bit from GLD

Open clandest opened this issue 6 years ago • 1 comments

Use the public IP, if available, to obtain the country code from the GLD database. Check the country code against a hard-coded list of non-Free-World countries to see whether we're in the Free World or not, and add that information to our Node Record in the Neighborhood.

clandest avatar Sep 22 '19 15:09 clandest

Roadmap:

  1. Introduce new struct NodeLocation { id: u8, country: String, free_world: bool }
    pub struct NodeLocation { 
        pub(crate) country_code: String, 
        pub(crate) free_world_bit: bool
    }
    
  2. Introduce new function get_node_location() to obtain country_code and free_world_bit
  3. Implement country_code for NodeRecordInner_0v1 for Gossip purpose

czarte avatar May 05 '24 19:05 czarte