adding kernels chart

This commit is contained in:
aglkm
2024-10-01 13:51:33 +03:00
parent 8b5d7ff2ea
commit 2fa9e29a03
4 changed files with 85 additions and 5 deletions

View File

@@ -38,6 +38,7 @@ pub async fn stats(dash: Arc<Mutex<Dashboard>>, txns: Arc<Mutex<Transactions>>,
stats.txns.remove(0);
stats.fees.remove(0);
stats.utxo_count.remove(0);
stats.kernels.remove(0);
}
stats.date.push(format!("\"{}\"", Utc::now().format("%d-%m-%Y")));
@@ -46,6 +47,9 @@ 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());
Ok(())
}