fix remaining blocks info msg
This commit is contained in:
parent
fd4272886b
commit
6c91f757aa
@ -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,
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
9
ui/ui.go
9
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
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user