Put hex-encoded version in UpdateTip #7763

pull sipa wants to merge 1 commits into bitcoin:master from sipa:hexver changing 2 files +5 −5
  1. sipa commented at 2:47 PM on March 29, 2016: member

    ... and also remove the hardly-readable nBits from UpdateTip's log message.

    The decimal printing of block nVersion is not very readable in a versionbits world.

  2. jonasschnelli added the label Docs and Output on Mar 29, 2016
  3. laanwj commented at 3:09 PM on March 29, 2016: member

    Maybe %08x?

  4. sipa force-pushed on Mar 29, 2016
  5. sipa force-pushed on Mar 29, 2016
  6. sipa commented at 3:31 PM on March 29, 2016: member

    Updated to use version=0x%08x

  7. sipa renamed this:
    Reformat version in UpdateTip and other messages
    Put hex-encoded version in UpdateTip
    on Mar 29, 2016
  8. sipa commented at 3:47 PM on March 29, 2016: member

    Renamed the pull request, as I noticed it wasn't accurate: there was no nVersion in that message before

  9. jonasschnelli commented at 1:05 PM on March 30, 2016: contributor

    Nice. utACK b73879958edcbf964f87fcab1384c04deafa9c6a

  10. in src/main.cpp:None in b73879958e outdated
    2548 | @@ -2549,8 +2549,8 @@ void static UpdateTip(CBlockIndex *pindexNew) {
    2549 |      nTimeBestReceived = GetTime();
    2550 |      mempool.AddTransactionsUpdated(1);
    2551 |  
    2552 | -    LogPrintf("%s: new best=%s  height=%d bits=%d log2_work=%.8g  tx=%lu  date=%s progress=%f  cache=%.1fMiB(%utx)\n", __func__,
    2553 | -      chainActive.Tip()->GetBlockHash().ToString(), chainActive.Height(), chainActive.Tip()->nBits,
    2554 | +    LogPrintf("%s: new best=%s height=%d version=0x%02x log2_work=%.8g tx=%lu date='%s' progress=%f cache=%.1fMiB(%utx)\n", __func__,
    


    paveljanik commented at 1:09 PM on March 30, 2016:

    version=0x%08x here too?


    laanwj commented at 9:32 AM on March 31, 2016:

    Yes I think that'd be consistent


    sipa commented at 10:30 AM on March 31, 2016:

    Thanks, fixed. That was a typo.

  11. paveljanik commented at 1:11 PM on March 30, 2016: contributor

    ACK https://github.com/bitcoin/bitcoin/pull/7763/commits/b73879958edcbf964f87fcab1384c04deafa9c6a

    Before:

    2016-03-30 13:05:47 UpdateTip: new best=00000000001880d1d2e6c6f340df9f2e317c3a04ae1e22b816113882936ed457  height=752296 bits=457179072 log2_work=67.118529  tx=9847921  date=2016-03-30 06:26:43 progress=0.999992  cache=0.0MiB(22tx)
    

    after:

    2016-03-30 13:06:37 UpdateTip: new best=00000000002b58079cfb57b2fc41e677238488c6808f630af8c694053dc8ced8 height=752620 version=0x04 log2_work=67.118541 tx=9851627 date='2016-03-30 10:17:49' progress=0.999996 cache=0.2MiB(1166tx)
    
  12. dcousens commented at 1:13 AM on March 31, 2016: contributor

    concept ACK, utACK b738799

  13. Reformat version in UpdateTip and other messages
    Also remove the hardly-readable nBits from UpdateTip's log message.
    eff736e55e
  14. sipa force-pushed on Mar 31, 2016
  15. sipa commented at 10:31 AM on March 31, 2016: member

    Fixed 0x%02x -> 0x%08x.

  16. laanwj merged this on Mar 31, 2016
  17. laanwj closed this on Mar 31, 2016

  18. laanwj referenced this in commit 3081fb9a31 on Mar 31, 2016
  19. codablock referenced this in commit 140ca2c75e on Sep 16, 2017
  20. codablock referenced this in commit 1ef5710b18 on Sep 19, 2017
  21. codablock referenced this in commit f6d87ab5e1 on Dec 9, 2017
  22. codablock referenced this in commit 99187ea624 on Dec 19, 2017
  23. codablock referenced this in commit 0956f3d67c on Dec 19, 2017
  24. MarcoFalke locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-13 15:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me