Skip to content

Conversation

@laanwj
Copy link
Member

@laanwj laanwj commented Jul 30, 2014

This pull adds per-network information to the getnetworkinfo RPC call:

  • Is the network limited?
  • Is the network reachable
  • Which proxy is used for this network, if any

Inspired by #2575.

(After these changes it is also allowed to use -onlynet=onion instead of -onlynet=tor, as I like it better to call the network onion)

laanwj added 3 commits July 30, 2014 15:38
Just an alias for onlynet=tor, but matches the new name
of the proxy option -onion= better.
Allows other parts of the program to query for reachable
status of a network. Similar to IsLimited(net).
Returns the network name for an Network enum.
@jgarzik
Copy link
Contributor

jgarzik commented Jul 31, 2014

Only item I see is "proxy" changing in JSON output -- do we care about backwards compat here?

ACK otherwise

@laanwj
Copy link
Member Author

laanwj commented Jul 31, 2014

getnetworkinfo is brand new, so not too many people will rely on the current interface yet and still use getinfo if they want 'the' proxy. I'm fine with adding it back for backwards compatibility, but IMO it gives the wrong idea that there is only one proxy.

@laanwj laanwj added the RPC label Jul 31, 2014
src/rpcnet.cpp Outdated
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: Misses a , after [ and it's an (array) not (object).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, there should be no , after [.
Good catch on the array versus object though.

@Diapolo
Copy link

Diapolo commented Aug 4, 2014

Looks good, after fixing the nits this an untested ACK ;).

@BitcoinPullTester
Copy link

Automatic sanity-testing: PASSED, see http://jenkins.bluematt.me/pull-tester/p4605_0590a54818ceb6c907c7ff6ff2f1a28d5ef383b2/ for binaries and test log.
This test script verifies pulls every time they are updated. It, however, dies sometimes and fails to test properly. If you are waiting on a test, please check timestamps to verify that the test.log is moving at http://jenkins.bluematt.me/pull-tester/current/
Contact BlueMatt on freenode if something looks broken.

src/rpcnet.cpp Outdated
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another small nit: In the help message we have IPv4, IPv6 or Onion.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I prefer to use lowercase here. People will be using case-sensitive comparisons on this output, and thus using only lowercase rules out one source of typos.

I know that the -help documentation shows the network names uppercased, which is IMO a bit strange, but we do case-insensitive comparison so for us it doesn't matter.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wasn't talking about uppercase, just , vs. or ;).

This commit adds per-network information to the
getnetworkinfo RPC call:

- Is the network limited?
- Is the network reachable
- Which proxy is used for this network, if any

Inspired by bitcoin#2575.
@laanwj laanwj merged commit aa82795 into bitcoin:master Aug 18, 2014
laanwj added a commit that referenced this pull request Aug 18, 2014
aa82795 Add detailed network info to getnetworkinfo RPC (Wladimir J. van der Laan)
075cf49 Add GetNetworkName function (Wladimir J. van der Laan)
c91a947 Add IsReachable(net) function (Wladimir J. van der Laan)
60dc8e4 Allow -onlynet=onion to be used (Wladimir J. van der Laan)
wtogami pushed a commit to litecoin-project/bitcoinomg that referenced this pull request Sep 9, 2014
Just an alias for onlynet=tor, but matches the new name
of the proxy option -onion= better.

Conflicts:
	src/init.cpp

Rebased-from: 60dc8e4208058814494b301c355a5996af9517a9
bitcoin/bitcoin#4605
wtogami pushed a commit to litecoin-project/bitcoinomg that referenced this pull request Sep 9, 2014
Allows other parts of the program to query for reachable
status of a network. Similar to IsLimited(net).

Rebased-from: c91a9471be7a96311a7e1452a3624aa557bc185d
bitcoin/bitcoin#4605
wtogami pushed a commit to litecoin-project/bitcoinomg that referenced this pull request Sep 9, 2014
Returns the network name for an Network enum.

Rebased-from: 075cf49e593025030c8b3572e606960f15de424e
bitcoin/bitcoin#4605
wtogami pushed a commit to litecoin-project/bitcoinomg that referenced this pull request Sep 9, 2014
This commit adds per-network information to the
getnetworkinfo RPC call:

- Is the network limited?
- Is the network reachable
- Which proxy is used for this network, if any

Inspired by #2575.

Conflicts:
	src/init.cpp
	src/rpcnet.cpp

Rebased-from: aa8279513b5d206c172d3da3d5e3034c61d47b39
bitcoin/bitcoin#4605
wtogami pushed a commit to wtogami/bitcoin that referenced this pull request Sep 10, 2014
Just an alias for onlynet=tor, but matches the new name
of the proxy option -onion= better.

Conflicts:
	src/init.cpp

Rebased-from: 60dc8e4
bitcoin#4605
wtogami pushed a commit to wtogami/bitcoin that referenced this pull request Sep 10, 2014
Allows other parts of the program to query for reachable
status of a network. Similar to IsLimited(net).

Rebased-from: c91a947
bitcoin#4605
wtogami pushed a commit to wtogami/bitcoin that referenced this pull request Sep 10, 2014
Returns the network name for an Network enum.

Rebased-from: 075cf49
bitcoin#4605
wtogami pushed a commit to wtogami/bitcoin that referenced this pull request Sep 10, 2014
This commit adds per-network information to the
getnetworkinfo RPC call:

- Is the network limited?
- Is the network reachable
- Which proxy is used for this network, if any

Inspired by bitcoin#2575.

Conflicts:
	src/init.cpp
	src/rpcnet.cpp

Rebased-from: aa82795
bitcoin#4605
wtogami pushed a commit to litecoin-project/litecoin that referenced this pull request Sep 19, 2014
Just an alias for onlynet=tor, but matches the new name
of the proxy option -onion= better.

Conflicts:
	src/init.cpp

Rebased-from: 60dc8e4 bitcoin#4605
wtogami pushed a commit to litecoin-project/litecoin that referenced this pull request Sep 19, 2014
Allows other parts of the program to query for reachable
status of a network. Similar to IsLimited(net).

Rebased-from: c91a947 bitcoin#4605
wtogami pushed a commit to litecoin-project/litecoin that referenced this pull request Sep 19, 2014
Returns the network name for an Network enum.

Rebased-from: 075cf49 bitcoin#4605
wtogami pushed a commit to litecoin-project/litecoin that referenced this pull request Sep 19, 2014
This commit adds per-network information to the
getnetworkinfo RPC call:

- Is the network limited?
- Is the network reachable
- Which proxy is used for this network, if any

Inspired by bitcoin#2575.

Conflicts:
	src/init.cpp
	src/rpcnet.cpp

Rebased-from: aa82795 bitcoin#4605
wtogami pushed a commit to litecoin-project/litecoin that referenced this pull request Oct 2, 2014
Just an alias for onlynet=tor, but matches the new name
of the proxy option -onion= better.

Conflicts:
	src/init.cpp

Rebased-from: 60dc8e4 bitcoin#4605
wtogami pushed a commit to litecoin-project/litecoin that referenced this pull request Oct 2, 2014
Allows other parts of the program to query for reachable
status of a network. Similar to IsLimited(net).

Rebased-from: c91a947 bitcoin#4605
wtogami pushed a commit to litecoin-project/litecoin that referenced this pull request Oct 2, 2014
Returns the network name for an Network enum.

Rebased-from: 075cf49 bitcoin#4605
wtogami pushed a commit to litecoin-project/litecoin that referenced this pull request Oct 2, 2014
This commit adds per-network information to the
getnetworkinfo RPC call:

- Is the network limited?
- Is the network reachable
- Which proxy is used for this network, if any

Inspired by bitcoin#2575.

Conflicts:
	src/init.cpp
	src/rpcnet.cpp

Rebased-from: aa82795 bitcoin#4605
wtogami pushed a commit to litecoin-project/litecoin that referenced this pull request Nov 14, 2014
Just an alias for onlynet=tor, but matches the new name
of the proxy option -onion= better.

Conflicts:
	src/init.cpp

Rebased-from: 60dc8e4 bitcoin#4605
wtogami pushed a commit to litecoin-project/litecoin that referenced this pull request Nov 14, 2014
Allows other parts of the program to query for reachable
status of a network. Similar to IsLimited(net).

Rebased-from: c91a947 bitcoin#4605
wtogami pushed a commit to litecoin-project/litecoin that referenced this pull request Nov 14, 2014
Returns the network name for an Network enum.

Rebased-from: 075cf49 bitcoin#4605
wtogami pushed a commit to litecoin-project/litecoin that referenced this pull request Nov 14, 2014
This commit adds per-network information to the
getnetworkinfo RPC call:

- Is the network limited?
- Is the network reachable
- Which proxy is used for this network, if any

Inspired by bitcoin#2575.

Conflicts:
	src/init.cpp
	src/rpcnet.cpp

Rebased-from: aa82795 bitcoin#4605
wtogami pushed a commit to litecoin-project/litecoin that referenced this pull request Dec 23, 2014
Just an alias for onlynet=tor, but matches the new name
of the proxy option -onion= better.

Conflicts:
	src/init.cpp

Rebased-from: 60dc8e4 bitcoin#4605
wtogami pushed a commit to litecoin-project/litecoin that referenced this pull request Dec 23, 2014
Allows other parts of the program to query for reachable
status of a network. Similar to IsLimited(net).

Rebased-from: c91a947 bitcoin#4605
wtogami pushed a commit to litecoin-project/litecoin that referenced this pull request Dec 23, 2014
Returns the network name for an Network enum.

Rebased-from: 075cf49 bitcoin#4605
wtogami pushed a commit to litecoin-project/litecoin that referenced this pull request Dec 23, 2014
This commit adds per-network information to the
getnetworkinfo RPC call:

- Is the network limited?
- Is the network reachable
- Which proxy is used for this network, if any

Inspired by bitcoin#2575.

Conflicts:
	src/init.cpp
	src/rpcnet.cpp

Rebased-from: aa82795 bitcoin#4605
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants