Make the proxy initialization code in AppInit2
more clear. This provides a straightforward flow, gets rid of .count() (which made it impossible to override an earlier provided proxy option to nothing), as well as comments the different cases.
Improve proxy initialization (continues #4871) #6272
pull laanwj wants to merge 2 commits into bitcoin:master from laanwj:2015_06_proxyinit changing 2 files +71 −32-
laanwj commented at 7:46 am on June 12, 2015: member
-
laanwj added the label P2P on Jun 12, 2015
-
in src/init.cpp: in 8a0a181c8a outdated
1024+ std::string onionArg = GetArg("-onion", ""); 1025+ if (onionArg != "") { 1026+ if (onionArg == "0") { // Handle -noonion/-onion=0 1027+ SetReachable(NET_TOR, false); // set onions as unreachable 1028+ } else { 1029+ proxyType addrOnion;
Diapolo commented at 9:40 am on June 12, 2015:Nit: Above you did this as one-liner, so I suggestproxyType addrOnion = proxyType(CService(onionArg, 9050), proxyRandomize);
laanwj commented at 10:07 am on June 12, 2015:Good idea.Diapolo commented at 9:43 am on June 12, 2015: noneThis is a different, but better apporach than what I tried to do. Flow is straight forward, which I really like. I didn’t yet test the code by myself, but from review this is (after fixing the nit) an utACK for now. I’m going to test this now.laanwj force-pushed on Jun 12, 2015Improve proxy initialization
Simplify and make the code in AppInit2 more clear. This provides a straightforward flow, gets rid of .count() (which makes it possible to override an earlier provided proxy option to nothing), as well as comments the different cases.
laanwj force-pushed on Jun 12, 2015Diapolo commented at 10:49 am on June 12, 2015: noneMy node connects normally via proxy, the pull compiles without problems, so this has my ACK.tests: Extend RPC proxy tests
Also test -noonion
laanwj commented at 12:35 pm on June 16, 2015: memberAdded more proxy tests (these test the output ofgetnetworkinfo
)laanwj merged this on Jun 18, 2015laanwj closed this on Jun 18, 2015
laanwj referenced this in commit 40400d53d3 on Jun 18, 2015zkbot referenced this in commit df07f9ad23 on Feb 15, 2017zkbot referenced this in commit ec069ce96c on Mar 3, 2017zkbot referenced this in commit 702eefc71a on Mar 3, 2017zkbot referenced this in commit 99c4c6de0c on Mar 3, 2017MarcoFalke 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-12-22 06:12 UTC
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-12-22 06:12 UTC
This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me
More mirrored repositories can be found on mirror.b10c.me