diff --git a/ui/blocks.go b/ui/blocks.go index c0766d1..3d0c742 100644 --- a/ui/blocks.go +++ b/ui/blocks.go @@ -75,7 +75,7 @@ func (b ProjectedBlock) Print(n int, x, _y int) []byte { var full int if n < 3 { full = int( - float64(b.BlockWeight) / 4000000 * 10, + float64(b.BlockWeight) / 4_000_000 * 10, ) } diff --git a/ui/ui.go b/ui/ui.go index 8b34eff..137c9f8 100644 --- a/ui/ui.go +++ b/ui/ui.go @@ -252,9 +252,16 @@ func (ui *UI) info(g *gocui.Gui, x, y int) error { mSize += b.BlockSize } + // Compute the total number of blocks on the mempool + // We use the total BlockWeight / 4mm + var w float64 + for _, b := range ui.state.projected { + w += float64(b.BlockWeight) + } + fmt.Fprintf(v, "%s %s, %s %s", red("Unconfirmed Txs: "), white("%d", info.Size), - blue("Mempool size"), white("%s (%d block/s)", fmtSize(mSize), len(ui.state.projected)), + blue("Mempool size"), white("%s (%d block/s)", fmtSize(mSize), ceil(w/4_000_000)), ) return nil }