Added blockchain full check on start. Fixed cond_var blocking.

This commit is contained in:
Revertron
2021-04-20 18:46:06 +02:00
parent 51633f3e27
commit 161e600290
4 changed files with 106 additions and 79 deletions
-9
View File
@@ -196,11 +196,6 @@ fn action_loaded(context: &Arc<Mutex<Context>>, web_view: &mut WebView<()>) {
let context_copy = Arc::clone(&context);
let mut c = context.lock().unwrap();
let keystore = c.keystore.clone();
if let Some(event) = c.chain.update(&keystore) {
c.bus.post(event);
}
c.bus.register(move |_uuid, e| {
//debug!("Got event from bus {:?}", &e);
let status = Arc::clone(&status);
@@ -220,10 +215,6 @@ fn action_loaded(context: &Arc<Mutex<Context>>, web_view: &mut WebView<()>) {
Event::KeyLoaded { path, public, hash } |
Event::KeySaved { path, public, hash } => {
load_domains(&mut context, &handle);
let keystore = context.keystore.clone();
if let Some(event) = context.chain.update(&keystore) {
context.bus.post(event);
}
format!("keystoreChanged('{}', '{}', '{}');", &path, &public, &hash)
}
Event::MinerStarted | Event::KeyGeneratorStarted => {