Skip to content

Commit 1632584

Browse files
committed
Remove MempoolStats::size_mb
Signed-off-by: Yuki Kishimoto <yukikishimoto@protonmail.com>
1 parent 4385401 commit 1632584

1 file changed

Lines changed: 0 additions & 18 deletions

File tree

src/response.rs

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -510,12 +510,6 @@ pub struct MempoolStats {
510510
}
511511

512512
impl MempoolStats {
513-
/// Total size (MB) of all transactions in mempool
514-
pub fn size_mb(&self) -> f64 {
515-
let vbyte: u64 = self.vsize.to_vbytes_ceil();
516-
vbyte as f64 / 1_000_000.0
517-
}
518-
519513
/// Calculate average fee rate
520514
pub fn avg_fee_rate(&self) -> FeeRate {
521515
if self.fee_histogram.is_empty() {
@@ -891,18 +885,6 @@ mod tests {
891885
assert!((converted_back - 8.687).abs() < 0.001);
892886
}
893887

894-
#[test]
895-
fn test_mempool_size_conversion_to_mb() {
896-
let stats = MempoolStats {
897-
count: 1,
898-
vsize: Weight::from_vb_unchecked(2345565),
899-
total_fee: Amount::from_sat(1000),
900-
fee_histogram: vec![],
901-
};
902-
903-
assert_eq!(stats.size_mb(), 2.345565);
904-
}
905-
906888
#[test]
907889
fn test_mempool_avg_fee_rate() {
908890
let stats = MempoolStats {

0 commit comments

Comments
 (0)