RPC: Chainparams: Simplify -rpcport and CBaseMainParams #11404

pull jtimon wants to merge 1 commits into bitcoin:master from jtimon:b16-chainparams-rpcport changing 7 files +23 −49
  1. jtimon commented at 2:58 AM on September 26, 2017: contributor

    (the latter is just a very encapsulated global string var now [but it still decides what dir to read fikes from]).

    Command line argument -rpcport no longer has a complex default to think about. The default for bitcoin is 8332 and remains that. For testnet3 and regtest; explicitly specifying -rpcport=18332 and -rpcport=18443 respectively is still possible as always.

  2. RPC: Chainparams: Simplify -rpcport and CBaseMainParams (the latter...
    is just a very encapsulated global string var now [but it still
    decides what dir to read fiked from])
    7eb23490b9
  3. fanquake added the label RPC/REST/ZMQ on Sep 26, 2017
  4. dcousens approved
  5. sipa commented at 3:06 AM on September 26, 2017: member

    I don't understand why?

  6. gmaxwell commented at 4:42 AM on September 26, 2017: contributor

    NAK. This seems to be a straightforward reduction in functionality for no obvious reason.

  7. esotericnonsense commented at 3:10 PM on September 26, 2017: contributor

    NACK echoing comments above

  8. jtimon commented at 5:36 PM on September 26, 2017: contributor

    The reason is to simplify the code and configuration. Chainparams is abused for many things that have nothing to do with the chain itself, like defaults for other options (like in this case). I don't consider this a reduction in functionality but a simplification in the configuration. The functionality is selecting the rpc port, which can still be done.

    I would also remove GetDefaultPort, DefaultConsistencyChecks and RequireStandard from CChainParams, but I assume that would be nacked as well for being considered "a reduction of functionality"...

  9. jtimon closed this on Sep 26, 2017

  10. sipa commented at 5:40 PM on September 26, 2017: member

    @jtimon Simplification is a good thing, but maybe you're missing the functionality this brings. The P2P network heavily favors nodes that run on the default port (there is a bias for them when making outgoing connections - preventing DoS attacks on third party services, and DNS seeds can only give results that run on the default port). Further you're ccomplicating running both testnet and mainnet on the same machine.

  11. jtimon commented at 6:31 PM on September 26, 2017: contributor

    Running mainnet and testnet in the same machine would just -rpcport=18332 (for example) for testnet. I assume the default port thing applies to CChainParams::GetDefaultPort not BaseParams().RPCPort().

    But yeah, I didn't know about that.

  12. 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