Skip to content
This repository has been archived by the owner on Jun 25, 2021. It is now read-only.

Commit

Permalink
feat: start the first node with higher age
Browse files Browse the repository at this point in the history
  • Loading branch information
madadam committed Nov 12, 2020
1 parent afb609e commit d23914e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/routing/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ use crate::{
location::{DstLocation, SrcLocation},
node::Node,
peer::Peer,
relocation::STARTUP_PHASE_AGE_RANGE,
section::{EldersInfo, SectionProofChain},
TransportConfig,
};
Expand Down Expand Up @@ -94,7 +95,8 @@ impl Routing {
let comm = Comm::new(config.transport_config)?;
let incoming_msgs = comm.listen()?;

let node = Node::new(keypair, comm.our_connection_info().await?);
let node = Node::new(keypair, comm.our_connection_info().await?)
.with_age(STARTUP_PHASE_AGE_RANGE.end);
let state = Approved::first_node(node, event_tx)?;

state.send_event(Event::PromotedToElder);
Expand Down

0 comments on commit d23914e

Please sign in to comment.