Fixed build.
This commit is contained in:
@@ -48,14 +48,14 @@ fn download_iana_zones(zones_name: &str, hashes_name: &str) {
|
||||
Ok(mut file) => {
|
||||
file.write_all(zones.trim().as_bytes()).expect("Error saving TLDs file!");
|
||||
}
|
||||
Err(e) => { println!("Error opening TLDs file!\n{}", e); }
|
||||
Err(e) => { panic!("Error opening TLDs file!\n{}", e); }
|
||||
}
|
||||
|
||||
match File::create(Path::new(hashes_name)) {
|
||||
Ok(mut file) => {
|
||||
file.write_all(hashes.trim().as_bytes()).expect("Error saving TLD-hashes file!");
|
||||
}
|
||||
Err(e) => { println!("Error opening TLD-hashes file!\n{}", e); }
|
||||
Err(e) => { panic!("Error opening TLD-hashes file!\n{}", e); }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+2
-1
@@ -477,6 +477,7 @@ fn handle_message(context: Arc<Mutex<Context>>, message: Message, peers: &mut Pe
|
||||
}
|
||||
|
||||
fn process_new_block(context: Arc<Mutex<Context>>, peers: &mut Peers, token: &Token, block: Block) -> State {
|
||||
let peers_count = peers.get_peers_active_count();
|
||||
let peer = peers.get_mut_peer(token).unwrap();
|
||||
peer.set_received_block(block.index);
|
||||
if let Some(transaction) = &block.transaction {
|
||||
@@ -485,7 +486,7 @@ fn process_new_block(context: Arc<Mutex<Context>>, peers: &mut Peers, token: &To
|
||||
return State::Banned;
|
||||
}
|
||||
}
|
||||
let peers_count = peers.get_peers_active_count();
|
||||
|
||||
let mut context = context.lock().unwrap();
|
||||
let max_height = context.chain.max_height();
|
||||
match context.chain.check_new_block(&block) {
|
||||
|
||||
Reference in New Issue
Block a user