From 1592983dfd78c2ff562d8bab41fc2fd60a8af901 Mon Sep 17 00:00:00 2001 From: Roman Zeyde Date: Sat, 13 Aug 2022 18:38:30 +0300 Subject: [PATCH] Fix mempool fee rate formatting Following #728 --- src/mempool.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mempool.rs b/src/mempool.rs index 8a3fb9a..efc752f 100644 --- a/src/mempool.rs +++ b/src/mempool.rs @@ -133,9 +133,9 @@ impl Mempool { self.add_entry(*txid, tx, entry); } self.fees = FeeHistogram::new(self.entries.values().map(|e| (e.fee, e.vsize))); - for i in 1..FeeHistogram::BINS { + for i in 0..FeeHistogram::BINS { let bin_index = FeeHistogram::BINS - i - 1; // from 63 to 0 - let limit = 1u64 << i; + let limit = 1u128 << i; let label = format!("[{:20.0}, {:20.0})", limit / 2, limit); self.vsize.set(&label, self.fees.vsize[bin_index] as f64); self.count.set(&label, self.fees.count[bin_index] as f64);