|
|
@ -97,7 +97,6 @@ pub fn get_coinsupply(uri: http::Uri, no_cert: bool) -> Result<Coinsupply, Strin |
|
|
|
let mut rt = tokio::runtime::Runtime::new().map_err(|e| e.to_string())?; |
|
|
|
|
|
|
|
rt.block_on(get_coinsupply_info(&uri, no_cert)).map_err( |e| e.to_string()) |
|
|
|
// tokio::runtime::current_thread::Runtime::new().unwrap().block_on(runner)
|
|
|
|
} |
|
|
|
|
|
|
|
async fn get_block_range<F : 'static + std::marker::Send>( |
|
|
@ -165,7 +164,6 @@ pub fn fetch_blocks<F : 'static + std::marker::Send>(uri: &http::Uri, start_heig |
|
|
|
Err(e) => { |
|
|
|
let es = format!("Error creating runtime {:?}", e); |
|
|
|
error!("{}", es); |
|
|
|
eprintln!("{}", e); |
|
|
|
return Err(es); |
|
|
|
} |
|
|
|
}; |
|
|
@ -175,7 +173,6 @@ pub fn fetch_blocks<F : 'static + std::marker::Send>(uri: &http::Uri, start_heig |
|
|
|
Err(e) => { |
|
|
|
let e = format!("Error fetching blocks {:?}", e); |
|
|
|
error!("{}", e); |
|
|
|
eprintln!("{}", e); |
|
|
|
Err(e) |
|
|
|
} |
|
|
|
} |
|
|
@ -246,7 +243,6 @@ pub fn fetch_transparent_txids<F : 'static + std::marker::Send>(uri: &http::Uri, |
|
|
|
Err(e) => { |
|
|
|
let e = format!("Error creating runtime {:?}", e); |
|
|
|
error!("{}", e); |
|
|
|
eprintln!("{}", e); |
|
|
|
return Err(e); |
|
|
|
} |
|
|
|
}; |
|
|
@ -256,13 +252,11 @@ pub fn fetch_transparent_txids<F : 'static + std::marker::Send>(uri: &http::Uri, |
|
|
|
Err(e) => { |
|
|
|
let e = format!("Error with get_address_txids runtime {:?}", e); |
|
|
|
error!("{}", e); |
|
|
|
eprintln!("{}", e); |
|
|
|
Err(e) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// get_transaction GRPC call
|
|
|
|
async fn get_transaction(uri: &http::Uri, txid: TxId, no_cert: bool)
|
|
|
|
-> Result<RawTransaction, Box<dyn std::error::Error>> { |
|
|
@ -280,7 +274,6 @@ pub fn fetch_full_tx(uri: &http::Uri, txid: TxId, no_cert: bool) -> Result<Vec<u |
|
|
|
Err(e) => { |
|
|
|
let errstr = format!("Error creating runtime {}", e.to_string()); |
|
|
|
error!("{}", errstr); |
|
|
|
eprintln!("{}", errstr); |
|
|
|
return Err(errstr); |
|
|
|
} |
|
|
|
}; |
|
|
@ -290,7 +283,6 @@ pub fn fetch_full_tx(uri: &http::Uri, txid: TxId, no_cert: bool) -> Result<Vec<u |
|
|
|
Err(e) => { |
|
|
|
let errstr = format!("Error in get_transaction runtime {}", e.to_string()); |
|
|
|
error!("{}", errstr); |
|
|
|
eprintln!("{}", errstr); |
|
|
|
Err(errstr) |
|
|
|
} |
|
|
|
}
|
|
|
|