Fixed block precedence calculation.

This commit is contained in:
Revertron
2022-07-10 23:07:59 +02:00
parent a13c824f7d
commit a27b6cc75c
4 changed files with 7 additions and 3 deletions
+4
View File
@@ -98,6 +98,10 @@ impl Block {
return true;
}
if my_diff == it_diff && self.nonce != other.nonce {
return self.nonce < other.nonce;
}
false
}
}
+1 -1
View File
@@ -406,7 +406,7 @@ impl HttpsDnsClient {
let agent = ureq::AgentBuilder::new()
.user_agent(&client_name)
.timeout(std::time::Duration::from_secs(5))
.max_idle_connections_per_host(8)
.max_idle_connections_per_host(2)
.max_idle_connections(16)
.resolver(move |addr: &str| {
let addr = match addr.find(':') {
+1 -1
View File
@@ -442,7 +442,7 @@ fn action_create_domain(context: Arc<Mutex<Context>>, miner: Arc<Mutex<Miner>>,
};
match context.chain.can_mine_domain(context.chain.get_height(), &name, &pub_key) {
MineResult::Fine => {
std::mem::drop(context);
drop(context);
create_domain(c, miner, CLASS_DOMAIN, &name, data, DOMAIN_DIFFICULTY, &keystore, signing, encryption, renewal);
let _ = web_view.eval("domainMiningStarted();");
event_info(web_view, &format!("Mining of domain \\'{}\\' has started", &name));