mirror of
https://github.com/Revertron/Alfis
synced 2024-11-17 03:25:43 +00:00
Fixed more duplicate peers from exchange.
This commit is contained in:
parent
df19021c62
commit
9a9adbe251
@ -330,7 +330,7 @@ fn handle_message(context: Arc<Mutex<Context>>, message: Message, peers: &mut Pe
|
||||
let mut context = context.lock().unwrap();
|
||||
match context.blockchain.add_block(block) {
|
||||
Ok(_) => { context.bus.post(crate::event::Event::BlockchainChanged); }
|
||||
Err(_) => { warn!("Error adding received block"); }
|
||||
Err(_) => { warn!("Discarded received block"); }
|
||||
}
|
||||
});
|
||||
State::idle()
|
||||
|
@ -73,6 +73,14 @@ impl Peers {
|
||||
continue;
|
||||
}
|
||||
|
||||
if self.new_peers
|
||||
.iter()
|
||||
.find(|a| a.clone().eq(&addr))
|
||||
.is_some() {
|
||||
debug!("Skipping address from exchange: {}", &addr);
|
||||
continue;
|
||||
}
|
||||
|
||||
if skip_addr(&addr) {
|
||||
debug!("Skipping address from exchange: {}", &addr);
|
||||
continue; // Return error in future
|
||||
|
Loading…
Reference in New Issue
Block a user