chainparams: do not log signet startup messages for other chains #20048

pull jonatack wants to merge 1 commits into bitcoin:master from jonatack:signet-startup-logging-bugfix changing 3 files +8 −2
  1. jonatack commented at 5:21 pm on September 30, 2020: member

    The following signet startup messages are printed to the debug log immediately on node startup for all chains. This behavior occurs on master as a side effect after the merge of #20014. This PR removes the first message and moves the signet derived magic logging to init.cpp.

    0$ ./src/bitcoind
    12020-09-30T14:25:15Z Using default signet network
    22020-09-30T14:25:15Z Signet derived magic (message start): 0a03cf40
    32020-09-30T14:25:15Z Bitcoin Core version v0.20.99.0 ...
    
  2. DrahtBot added the label Validation on Sep 30, 2020
  3. MarcoFalke commented at 5:53 pm on September 30, 2020: member
    Seems odd for a constructor to log anyway. I’d say to remove them or move them elsewhere
  4. jonatack commented at 6:08 pm on September 30, 2020: member
    Makes sense, but I didn’t move them because they are related to the values being set, and because the first message interrelates with the other -signetchallenge messages and value settings. Pinging @kallewoof for thoughts.
  5. practicalswift commented at 6:31 pm on September 30, 2020: contributor

    Concept ACK

    Agree with MarcoFalke regarding removing them from the ctor.

  6. hebasto commented at 6:36 pm on September 30, 2020: member
    Concept ACK.
  7. kallewoof commented at 3:41 am on October 1, 2020: member
    Concept and utACK
  8. kallewoof commented at 3:42 am on October 1, 2020: member
    Removing is fine, but they’re useful esp for custom signets since you need the magic for external software.
  9. MarcoFalke commented at 6:44 am on October 1, 2020: member
    The magic is logged unconditionally in the constructor. If needed, it can be logged unconditionally in the startup-sequence, e.g. init.cpp
  10. signet: do not log signet startup messages for other chains
    and move signet network magic logging from chainparams.cpp to init.cpp
    6fccad7f71
  11. jonatack force-pushed on Oct 1, 2020
  12. jonatack commented at 9:29 am on October 1, 2020: member
    Updated proposal: removed the first message and moved the signet network magic message to init.cpp.
  13. kallewoof approved
  14. kallewoof commented at 9:30 am on October 1, 2020: member
    utACK 6fccad7f711df330e461c1fab3f758d078345ed5
  15. hebasto approved
  16. hebasto commented at 9:52 am on October 1, 2020: member

    ACK 6fccad7f711df330e461c1fab3f758d078345ed5

    Maybe also add testing for not appearing signet messages in the log if not on signet?

  17. MarcoFalke commented at 9:54 am on October 1, 2020: member
    ACK 6fccad7f711df330e461c1fab3f758d078345ed5
  18. MarcoFalke merged this on Oct 1, 2020
  19. MarcoFalke closed this on Oct 1, 2020

  20. jonatack deleted the branch on Oct 1, 2020
  21. jonatack commented at 11:35 am on October 1, 2020: member

    Maybe also add testing for not appearing signet messages in the log if not on signet?

    TBH was tempted but thought even the one added test might be overkill.

  22. MarcoFalke commented at 11:38 am on October 1, 2020: member

    Maybe also add testing for not appearing signet messages in the log if not on signet?

    I just tested this manually, and it seems unlikely and low-risk to regress

  23. DrahtBot locked this on Feb 15, 2022

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: 2024-07-05 19:13 UTC

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