Eliminated connection loops.

Optimized network processes.
Removed some unnecessary logging.
Fixed status bar info inconsistency.
This commit is contained in:
Revertron
2021-03-21 00:19:09 +01:00
parent 4497dc515b
commit dcf5bb72b0
13 changed files with 178 additions and 85 deletions
+2 -2
View File
@@ -185,7 +185,7 @@ impl Chain {
None
}
Some(block) => {
trace!("Loaded block: {:?}", &block);
//trace!("Loaded block: {:?}", &block);
Some(block)
}
};
@@ -229,7 +229,7 @@ impl Chain {
None
}
Some(block) => {
trace!("Got last full block: {:?}", &block);
//trace!("Got last full block: {:?}", &block);
Some(block)
}
};
+4 -4
View File
@@ -43,12 +43,12 @@ impl DnsFilter for BlockchainFilter {
let mut packet = DnsPacket::new();
packet.questions.push(DnsQuestion::new(String::from(qname), qtype));
packet.header.rescode = ResultCode::SERVFAIL;
trace!("Returning packet: {:?}", &packet);
//trace!("Returning packet: {:?}", &packet);
return Some(packet);
}
}
Some(data) => {
info!("Found data for domain {}", &search);
debug!("Found data for domain {}", &search);
let mut data: DomainData = match serde_json::from_str(&data) {
Err(_) => { return None; }
Ok(data) => { data }
@@ -136,14 +136,14 @@ impl DnsFilter for BlockchainFilter {
for answer in answers {
packet.answers.push(answer);
}
trace!("Returning packet: {:?}", &packet);
//trace!("Returning packet: {:?}", &packet);
Some(packet)
} else {
// Create DnsPacket
let mut packet = DnsPacket::new();
packet.questions.push(DnsQuestion::new(String::from(qname), qtype));
packet.header.rescode = ResultCode::SERVFAIL;
trace!("Returning packet: {:?}", &packet);
//trace!("Returning packet: {:?}", &packet);
Some(packet)
}
}