diff --git a/lib/Cargo.toml b/lib/Cargo.toml index a2f32a9..ccab1bf 100644 --- a/lib/Cargo.toml +++ b/lib/Cargo.toml @@ -11,4 +11,4 @@ crate-type = ["staticlib"] [dependencies] libc = "0.2.58" lazy_static = "1.4.0" -zecwalletlitelib = { git = "https://github.com/adityapk00/zecwallet-light-cli", rev = "61dc063fe155d1510e9a074e5a3577a0621f8c3a" } +zecwalletlitelib = { git = "https://github.com/adityapk00/zecwallet-light-cli", rev = "96997c5a467b710286bc9c6fea818b9d7d76f254" } diff --git a/lib/src/lib.rs b/lib/src/lib.rs index afe5456..39c5989 100644 --- a/lib/src/lib.rs +++ b/lib/src/lib.rs @@ -57,6 +57,9 @@ pub extern fn litelib_initialize_new(dangerous: bool, server: *const c_char) -> } }; + // Initialize logging + let _ = lightclient.init_logging(); + let seed = match lightclient.do_seed_phrase() { Ok(s) => s.dump(), Err(e) => { @@ -105,6 +108,9 @@ pub extern fn litelib_initialize_new_from_phrase(dangerous: bool, server: *const } }; + // Initialize logging + let _ = lightclient.init_logging(); + LIGHTCLIENT.lock().unwrap().replace(Some(Arc::new(lightclient))); let c_str = CString::new("OK").unwrap(); @@ -137,6 +143,9 @@ pub extern fn litelib_initialize_existing(dangerous: bool, server: *const c_char } }; + // Initialize logging + let _ = lightclient.init_logging(); + LIGHTCLIENT.lock().unwrap().replace(Some(Arc::new(lightclient))); let c_str = CString::new("OK").unwrap(); diff --git a/src/controller.cpp b/src/controller.cpp index 8459236..3b9b045 100644 --- a/src/controller.cpp +++ b/src/controller.cpp @@ -169,6 +169,8 @@ void Controller::getInfoThenRefresh(bool force) { bool doUpdate = force || (model->getLatestBlock() != curBlock); model->setLatestBlock(curBlock); + main->logger->write(QString("Refresh. curblock ") % QString::number(curBlock) % ", update=" % (doUpdate ? "true" : "false") ); + // Connected, so display checkmark. auto tooltip = Settings::getInstance()->getSettings().server + "\n" + QString::fromStdString(zrpc->getConnection()->getInfo().dump()); diff --git a/src/settings.h b/src/settings.h index a031d89..78e824e 100644 --- a/src/settings.h +++ b/src/settings.h @@ -99,7 +99,7 @@ public: static const QString labelRegExp; - static const int updateSpeed = 60 * 1000; // 60 sec + static const int updateSpeed = 30 * 1000; // 30 sec static const int priceRefreshSpeed = 60 * 60 * 1000; // 1 hr private: