Discuss: unify bip70 chain names, user-facing chain strings and default dir names #6229

pull jtimon wants to merge 6 commits into bitcoin:master from jtimon:chainparams-bip70 changing 11 files +156 −98
  1. jtimon commented at 10:09 am on June 4, 2015: contributor

    Several improvements related to chainparams were accumulating in #5229, but they don’t need to add a new option for them to make sense, so I’m taking them ot for discussion. Since there are several somewhat-orthogonal changes here, the scope of the PR will probably be reduced after discussion. There are several changes:

    • The use of a more conventional factory is interesting for separating the stateless parts of chainparams later like @theuni planned to do (the stateless factory could remain where it is).
    • Replacing the enum with constant strings (suggested by @laanwj ) may not seem very useful by itself, but it allows to unify some things (also simplifies things for the factory).

    The most controversial thing is proposing to unify some things for testnet that are already unified for regtest. The first step would be to replace the user-facing strings (including windows’ direct access names) to fit the chain names described in bip70 (use “test” instead of “testnet”). We could also unify the default name for the data directory. That would mean either change the directory file from “testnet3” to “test” (not retro-compatible) or changing the chain name “test” to “testnet3” in BIP70. I don’t understand why “test” was chosen instead of “testnet” for bip70 in the first place so my preference is the later. For the user-facing strings, that would be like having changed directly from “testnet” to “testnet3” (without passing through the current bip70-compatible “test”).

  2. jtimon force-pushed on Jun 4, 2015
  3. jtimon force-pushed on Jun 4, 2015
  4. in src/qt/paymentserver.cpp: in ed6278b252 outdated
    247-                }
    248-                else if (request.getDetails().network() == "test")
    249-                {
    250-                    SelectParams(CBaseChainParams::TESTNET);
    251-                }
    252+                // TODO find out why this excludes regtest
    


    Diapolo commented at 10:10 am on June 5, 2015:
    IMHO there are no regtest payment requests ;).

    jtimon commented at 7:55 pm on June 5, 2015:
    Maybe that’s the reason, but why not support it for free then? I can further simplify the code but not making a special case of regtest here. Besides, if it needs to be a special case then we need another field in chainparams, not treating regtest specially without doing so explicitly.
  5. laanwj added the label Refactoring on Jun 9, 2015
  6. Introduce Container template fb32fc78e9
  7. jtimon force-pushed on Jun 25, 2015
  8. Chainparams: Replace CBaseChainParams::Network enum with string constants (suggested by Wladimir) 61a3fad471
  9. Chainparams: Use a regular factory for creating chainparams 3b459c7f88
  10. DRY: TODO find out why this excludes regtest 4cc0e35b89
  11. Change?: Chainparams: DRY: Make qt/guiutil.cpp fit BIP70 chain name strings 68f17435d1
  12. Change?: bip70 CBaseChainParams::TESTNET = from "test" to "testnet3" (and user-facing testnet to "testnet3") edc08a3dc8
  13. jtimon force-pushed on Jun 25, 2015
  14. jtimon commented at 9:55 pm on June 25, 2015: contributor
    EDIT: Closing until it can be expressed in a few lines some #6359 or a subset of it is merged.
  15. jtimon closed this on Jun 25, 2015

  16. DrahtBot 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: 2024-10-04 22:12 UTC

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