Speed up of initial peer discovery.

This commit is contained in:
Revertron
2021-04-01 12:16:22 +02:00
parent 162ff5e64e
commit d70b107955
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "alfis"
version = "0.3.7"
version = "0.3.8"
authors = ["Revertron <alfis@revertron.com>"]
edition = "2018"
build = "build.rs"
+1 -1
View File
@@ -337,7 +337,7 @@ fn handle_message(context: Arc<Mutex<Context>>, message: Message, peers: &mut Pe
let mut context = context.lock().unwrap();
let blocks_count = context.chain.height();
context.bus.post(crate::event::Event::NetworkStatus { nodes: active_count + 1, blocks: blocks_count });
if peer.is_higher(my_height) {
if active_count > 3 && peer.is_higher(my_height) {
context.chain.update_max_height(height);
context.bus.post(crate::event::Event::Syncing { have: my_height, height});
State::message(Message::GetBlock { index: my_height + 1 })