lbrycrd/src/rpc
Pieter Wuille 326a5652e0
Merge #11456: Replace relevant services logic with a function suite.
15f5d3b17 Switch DNSSeed-needed metric to any-automatic-nodes, not services (Matt Corallo)
5ee88b4bd Clarify docs for requirements/handling of addnode/connect nodes (Matt Corallo)
57edc0b0c Rename fAddnode to a more-descriptive "manual_connection" (Matt Corallo)
44407100f Replace relevant services logic with a function suite. (Matt Corallo)

Pull request description:

  This was mostly written as a way to clean things up so that the NETWORK_LIMITED PR (#10387) can be simplified a ton, but its also a nice standalone cleanup that will also require a bit of review because it tweaks a lot of stuff across net. The new functions are fine in protocol.h right now since they're straight-forward, but after NETWORK_LIMITED will really want to move elsewhere after @theuni moves the nServices-based selection to addrman from connman.

  Adds HasAllRelevantServices and GetRelevantServices, which check
  for NETWORK|WITNESS.

  This changes the following:
   * Removes nRelevantServices from CConnman, disconnecting it a bit
     more from protocol-level logic.
   * Replaces our sometimes-connect-to-!WITNESS-nodes logic with
     simply always requiring WITNESS|NETWORK for outbound non-feeler
     connections (feelers still only require NETWORK).
   * This has the added benefit of removing nServicesExpected from
     CNode - instead letting net_processing's VERSION message
     handling simply check HasAllRelevantServices.
   * This implies we believe WITNESS nodes to continue to be a
     significant majority of nodes on the network, but also because
     we cannot sync properly from !WITNESS nodes, it is strange to
     continue using our valuable outbound slots on them.
   * In order to prevent this change from preventing connection to
     -connect= nodes which have !WITNESS, -connect nodes are now
     given the "addnode" flag. This also allows outbound connections
     to !NODE_NETWORK nodes for -connect nodes (which was already true
     of addnodes).
   * Has the (somewhat unintended) consequence of changing one of the
     eviction metrics from the same
     sometimes-connect-to-!WITNESS-nodes metric to requiring
     HasRelevantServices.

  This should make NODE_NETWORK_LIMITED much simpler to implement.

Tree-SHA512: 90606896c86cc5da14c77843b16674a6a012065e7b583d76d1c47a18215358abefcbab44ff4fab3fadcd39aa9a42d4740c6dc8874a58033bdfc8ad3fb5c649fc
2017-10-13 15:31:19 -07:00
..
blockchain.cpp Merge #11367: [rpc] getblockchaininfo: add size_on_disk, prune_target_size 2017-10-09 17:04:18 +02:00
blockchain.h Remove unnecessary forward class declarations in header files 2017-06-12 20:37:43 +02:00
client.cpp Merge #7061: [Wallet] Add RPC call "rescanblockchain <startheight> <stopheight>" 2017-10-13 15:23:22 -07:00
client.h rpc: Named argument support for bitcoin-cli 2017-01-10 12:04:54 +01:00
mining.cpp Change getmininginfo errors field to warnings 2017-09-27 11:27:26 -04:00
mining.h Properly bound check conf_target in wallet RPC calls 2017-07-14 23:41:40 -04:00
misc.cpp Implement BIP173 addresses and tests 2017-09-28 16:24:30 -07:00
net.cpp Clarify docs for requirements/handling of addnode/connect nodes 2017-10-13 13:29:25 -04:00
protocol.cpp rpc: Handle getinfo locally in bitcoin-cli w/ -getinfo 2017-09-27 21:53:07 -04:00
protocol.h Merge #10871: Handle getinfo in bitcoin-cli w/ -getinfo (revival of #8843) 2017-09-28 08:33:36 +02:00
rawtransaction.cpp Merge #11309: Minor cleanups for AcceptToMemoryPool 2017-09-29 15:07:57 +02:00
register.h Do not shadow global RPC table variable (tableRPC) 2016-08-25 15:02:26 +02:00
safemode.cpp rpc: Push down safe mode checks 2017-08-29 10:09:41 +02:00
safemode.h rpc: Push down safe mode checks 2017-08-29 10:09:41 +02:00
server.cpp Fix uninitialized URI in batch RPC requests 2017-10-03 15:25:00 -04:00
server.h Fix uninitialized URI in batch RPC requests 2017-10-03 15:25:00 -04:00