Chainparams: DRY: Make qt/guiutil.cpp fit BIP70 chain name strings #6908

pull jtimon wants to merge 1 commits into bitcoin:master from jtimon:chainparams-bip70-0.12.99 changing 1 files +9 −10
  1. jtimon commented at 9:25 PM on October 29, 2015: contributor

    As a side effect, the qt user will see "test" instead of "testnet".

    This simplifies creating new testchains by not having to introduce a new special case with each chain in this part of the code. The resulting code is also less redundant and shorter even with only 2 testchains.

    Part of #6382

  2. jtimon cross-referenced this on Oct 29, 2015 from issue DEPENDENT: Chainparams: Introduce N testnet chains to test different block sizes by jtimon
  3. dcousens commented at 5:53 AM on October 30, 2015: contributor

    utACK

  4. jtimon cross-referenced this on Oct 30, 2015 from issue Chainparams: Use a regular factory for creating chainparams by jtimon
  5. laanwj added the label Refactoring on Nov 3, 2015
  6. BIP70: Chainparams: DRY: Make qt/guiutil.cpp fit BIP70 chain name strings
    As a side effect, the qt user will see "test" instead of "testnet"
    c53d48a6b3
  7. in src/qt/guiutil.cpp:None in 7718d3b44e outdated
     588 | -
     589 | -    return GetSpecialFolderPath(CSIDL_STARTUP) / "Bitcoin.lnk";
     590 | +    std::string chain = ChainNameFromCommandLine();
     591 | +    if (chain == CBaseChainParams::MAIN)
     592 | +        return GetSpecialFolderPath(CSIDL_STARTUP) / "Bitcoin.lnk";
     593 | +    return GetSpecialFolderPath(CSIDL_STARTUP) / strprintf("Bitcoin (%s).lnk", chain);
    


    laanwj commented at 4:59 PM on November 3, 2015:

    This is not backwards compatible. The problem is that a startup link for testnet may already have been created. The scenario that the user enables testnet link at startup, upgrades, and then they cannot disable it anymore because it deletes a different link.

  8. jtimon force-pushed on Nov 4, 2015
  9. jtimon commented at 1:02 PM on November 4, 2015: contributor

    Good catch @laanwj . I hopefully fixed it.

  10. laanwj commented at 4:03 PM on November 4, 2015: member

    Looks good to me now. utACK

  11. MarcoFalke commented at 7:27 PM on November 5, 2015: member

    utACK

  12. laanwj merged this on Nov 9, 2015
  13. laanwj closed this on Nov 9, 2015

  14. laanwj referenced this in commit f24880b132 on Nov 9, 2015
  15. bitcoin 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-05-20 06:55 UTC