HomePhabricator

Change format of log2_work for uniform output (zero-padded)

Description

Change format of log2_work for uniform output (zero-padded)

Summary:

Motivation:
It's jarring to watch the output of tail -f ~/btcdata/debug.log scroll by and very frequently see columns not lining up correctly because log2_work somtimes has less precision than 8 digits.

Current display:

2020-06-18T02:54:42Z UpdateTip: new best=0000000000000000107f877e4920643f9fb06090fa7551cd1cdd83b857f520aa height=382038 version=0x00000003 log2_work=83.558653 tx=90953616 date='2015-11-04T17:11:44Z' progress=0.166675 cache=117.6MiB(966410txo)
2020-06-18T02:54:51Z UpdateTip: new best=0000000000000000019a4de585d30d1a8cc13c7a1972d11b4945635c9556acb5 height=382039 version=0x00000003 log2_work=83.55868 tx=90955936 date='2015-11-04T17:19:39Z' progress=0.166679 cache=117.9MiB(968799txo)

Display with this commit:

2020-06-18T02:54:42Z UpdateTip: new best=0000000000000000107f877e4920643f9fb06090fa7551cd1cdd83b857f520aa height=382038 version=0x00000003 log2_work=83.558653 tx=90953616 date='2015-11-04T17:11:44Z' progress=0.166675 cache=117.6MiB(966410txo)
2020-06-18T02:54:51Z UpdateTip: new best=0000000000000000019a4de585d30d1a8cc13c7a1972d11b4945635c9556acb5 height=382039 version=0x00000003 log2_work=83.558680 tx=90955936 date='2015-11-04T17:19:39Z' progress=0.166679 cache=117.9MiB(968799txo)

This is a backport of core#19317

Test Plan: ninja check-functional

Reviewers: #bitcoin_abc, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

Differential Revision: https://reviews.bitcoinabc.org/D9601

Details

Provenance
jmorgan <jmorgan@onshape.com>Authored on Jun 18 2020, 03:00
PiRKCommitted on May 28 2021, 15:22
PiRKPushed on May 28 2021, 15:22
Reviewer
Restricted Project
Differential Revision
D9601: Change format of log2_work for uniform output (zero-padded)
Parents
rABC75ae39a791fb: [avalanche] rename parameters in DelegationBuilder::addLevel
Branches
Unknown
Tags
Unknown