mirror of
https://github.com/transatoshi-mw/grin-explorer.git
synced 2025-10-22 05:43:42 +00:00
fix panick on startup if node is not fully synced
This commit is contained in:
@@ -47,8 +47,10 @@ pub async fn stats(dash: Arc<Mutex<Dashboard>>, txns: Arc<Mutex<Transactions>>,
|
||||
stats.fees.push(txns.fees_24h.clone());
|
||||
stats.utxo_count.push(dash.utxo_count.clone());
|
||||
|
||||
let kernel_count = dash.kernel_mmr_size.parse::<u64>().unwrap() / 2;
|
||||
stats.kernels.push(kernel_count.to_string());
|
||||
if dash.kernel_mmr_size.is_empty() == false {
|
||||
let kernel_count = dash.kernel_mmr_size.parse::<u64>().unwrap() / 2;
|
||||
stats.kernels.push(kernel_count.to_string());
|
||||
}
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
Reference in New Issue
Block a user