We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
We have decided to contain Fere World Bit and Country Code in NodeRecordInner_0v1
Fere World Bit
Country Code
NodeRecordInner_0v1
#[derive(Clone, PartialEq, Eq, Debug, Serialize, Deserialize)] #[allow(non_camel_case_types)] pub struct NodeRecordInner_0v1 { pub public_key: PublicKey, pub earning_wallet: Wallet, pub rate_pack: RatePack, pub neighbors: BTreeSet<PublicKey>, pub accepts_connections: bool, pub routes_data: bool, pub version: u32, pub free_world_bit: bool, pub country_code: String, }
There is need to be implemented location: Option<NodeLocation> into impl NodeRecord
location: Option<NodeLocation>
impl NodeRecord
impl NodeRecord { pub fn new( public_key: &PublicKey, ... location: Option<NodeLocation>, ) -> NodeRecord { let mut free_world = false; let mut country = String::default(); match location.as_ref() { Some(node_location) => { free_world = node_location.free_world; country = node_location.country.clone(); }, None => { }, }; let mut node_record = NodeRecord { metadata: NodeRecordMetadata::new(location), inner: NodeRecordInner_0v1 { public_key: public_key.clone(), ... free_world_bit: free_world, country_code: country }, signed_gossip: PlainData::new(&[]), signature: CryptData::new(&[]), }; node_record.regenerate_signed_gossip(cryptde); node_record } }
in NodeRecordMetadata we want to store the FreeWorldScore to handle the undesirability of the current Node to Exiting our Routes.
FreeWorldScore
Exiting
node_location: NodeLocation
NodeRecordMetadata
pub struct NodeRecordMetadata { pub last_update: u32, pub node_addr_opt: Option<NodeAddr>, pub unreachable_hosts: HashSet<String>, pub node_location: Option<NodeLocation>, pub free_world_score: u32 }
node_location
pub fn new(node_location: NodeLocation)
impl NodeRecordMetadata
NodeData
NodeRecord::new()
NodeData { public_key: &PublicKey, earning_wallet: Wallet, rate_pack: RatePack, accepts_connections: bool, routes_data: bool, version: u32, cryptde: &dyn CryptDE, node_location: NodeLocation }
The text was updated successfully, but these errors were encountered:
czarte
No branches or pull requests
We have decided to contain
Fere World Bit
andCountry Code
inNodeRecordInner_0v1
There is need to be implemented
location: Option<NodeLocation>
intoimpl NodeRecord
in NodeRecordMetadata we want to store the
FreeWorldScore
to handle the undesirability of the current Node toExiting
our Routes.node_location: NodeLocation
to structNodeRecordMetadata
node_location
to constructorpub fn new(node_location: NodeLocation)
intoimpl NodeRecordMetadata
NodeData
to pass it inNodeRecord::new()
instead of too many of variables:The text was updated successfully, but these errors were encountered: