Skip to content
Snippets Groups Projects
Commit e5afa366 authored by Jonas SPRENGER's avatar Jonas SPRENGER
Browse files

WIP Try to print info from the KV db.

parent f1a4a48e
No related branches found
No related tags found
No related merge requests found
......@@ -692,6 +692,7 @@ dependencies = [
"dubp-currency-params 0.2.0",
"dubp-user-docs 0.14.0",
"dup-crypto 0.7.0",
"durs-bc-db-reader 0.3.0-dev",
"durs-common-tools 0.2.0",
"durs-conf 0.3.0-dev",
"durs-message 0.3.0-dev",
......
......@@ -18,6 +18,7 @@ durs-network = { path = "../../core/network" }
dup-crypto = { path = "../../crypto" }
dubp-currency-params = { path = "../../dubp/currency-params" }
durs-common-tools = { path = "../../tools/common-tools" }
durs-bc-db-reader = { path = "../../modules-lib/bc-db-reader" }
failure = "0.1.5"
log = "0.4.*"
serde = "1.0.*"
......
......@@ -177,6 +177,18 @@ impl DursModule<DuRsConf, DursMsg> for GvaModule {
debug!("Send gva module registration to router thread.");
// Get db path
let db_path = durs_conf::get_blockchain_db_path(_soft_meta_datas.profile_path.clone());
// Open databases
let db = durs_bc_db_reader::open_db_ro(&db_path.as_path()).unwrap();
let current_blockstamp = durs_bc_db_reader::current_meta_datas::get_current_blockstamp(&db);
let currency_name = durs_bc_db_reader::current_meta_datas::get_currency_name(&db);
println!("current_blockstamp: {:#?}",current_blockstamp);
println!("currency_name: {:#?}",currency_name);
/*
* Main loop of your module
*/
......@@ -186,6 +198,9 @@ impl DursModule<DuRsConf, DursMsg> for GvaModule {
loop {
println!("IN GVA !!!!!!!!! {}",i);
i = i +1;
thread::sleep(ten_millis);
}
// If we reach this point it means that the module has stopped correctly, so we return OK.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment