netbase: Remove “tor” as a network specification #16029

pull dongcarl wants to merge 1 commits into bitcoin:master from dongcarl:2019-05-remove-net-tor changing 2 files +6 −7
  1. dongcarl commented at 3:59 pm on May 15, 2019: contributor
    0"tor" as a network specification was deprecated in 60dc8e4208 in favor
    1of "onion" and this commit removes it and updates the relevant test.
    
  2. DrahtBot added the label P2P on May 15, 2019
  3. DrahtBot added the label Tests on May 15, 2019
  4. in src/test/netbase_tests.cpp:321 in 31521f3920 outdated
    318+    // "onion" and later removed.
    319+    BOOST_CHECK_EQUAL(ParseNetwork("tor"), NET_UNROUTABLE);
    320+    BOOST_CHECK_EQUAL(ParseNetwork("TOR"), NET_UNROUTABLE);
    321 
    322     BOOST_CHECK_EQUAL(ParseNetwork(":)"), NET_UNROUTABLE);
    323     BOOST_CHECK_EQUAL(ParseNetwork("tÖr"), NET_UNROUTABLE);
    


    Empact commented at 6:03 pm on May 15, 2019:
    nit: update this to be a variation on a valid network?

    dongcarl commented at 6:08 pm on May 15, 2019:
    Not 100% sure what you mean. Like introduce a NET_LEGACY?

    maflcko commented at 6:15 pm on May 15, 2019:
    0    BOOST_CHECK_EQUAL(ParseNetwork("oniön"), NET_UNROUTABLE);
    

    ftfy


    dongcarl commented at 6:21 pm on May 15, 2019:
    Ah… Okay fixed in 4fda32f
  5. dongcarl force-pushed on May 15, 2019
  6. netbase: Remove "tor" as a network specification
    "tor" as a network specification was deprecated in 60dc8e4208 in favor
    of "onion" and this commit removes it and updates the relevant test.
    4fda32ff6e
  7. laanwj commented at 11:28 am on May 16, 2019: member

    I don’t think there’s any hurry to do this.

    What happens after this change if a user provides -onlynet=tor, please don’t tell me it’s silently ignored?

  8. fanquake commented at 7:07 am on May 17, 2019: member

    @laanwj

    What happens after this change if a user provides -onlynet=tor, please don’t tell me it’s silently ignored?

    With this change, running src/bitcoind --onlynet=tor will abort at startup:

    02019-05-17T07:05:08Z init message: Loading banlist...
    12019-05-17T07:05:08Z Error: Unknown network specified in -onlynet: 'tor'
    2Error: Unknown network specified in -onlynet: 'tor'
    32019-05-17T07:05:08Z Shutdown: In progress...
    42019-05-17T07:05:08Z scheduler thread interrupt
    52019-05-17T07:05:08Z Shutdown: done
    
  9. jonatack commented at 3:01 pm on May 17, 2019: member
    FWIW the deprecation warning this PR would remove was added more recently with #13532 than the 2014 commit https://github.com/bitcoin/bitcoin/commit/60dc8e4208 mentioned in the PR description above.
  10. dongcarl commented at 3:14 pm on May 17, 2019: contributor
    @jonatack Right. It seems like this was effectively deprecated in https://github.com/bitcoin/bitcoin/commit/60dc8e4208 but users would only have known about it with #13532. Closing, but perhaps we could add a release note item about the deprecation so more people know about it in case we decide to remove it in the future.
  11. dongcarl closed this on May 17, 2019

  12. laanwj commented at 2:17 pm on May 18, 2019: member
     With this change, running src/bitcoind --onlynet=tor will abort at startup:
    

    That’s good at least.

  13. bitcoin locked this on Dec 16, 2021
  14. fanquake commented at 1:42 pm on December 8, 2025: member
    Picked up in #34031.

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: 2025-12-20 06:12 UTC

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