Node
Node copied to clipboard
Free World Bit from GLD
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.
Roadmap:
-
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 } -
Introduce new function
get_node_location()to obtaincountry_codeandfree_world_bit -
Implement
country_codeforNodeRecordInner_0v1for Gossip purpose