aboutsummaryrefslogtreecommitdiff
path: root/src/rpc/net.cpp
AgeCommit message (Collapse)Author
2016-12-02fix getnettotals RPC description about timemillis.Masahiko Hyuga
Github-Pull: #9122 Rebased-From: a79f864945d7abe05e777a942864c181311e5070
2016-09-21Corrected JSON typo on setban of net.cppSev
Github-Pull: #8512 Rebased-From: 6ffd996b8ee5f36ed4490410385f9b072da5889b
2016-06-13Rework addnode behaviourPieter Wuille
* Use CNode::addeName to track whether a connection to a name is already open * A new connection to a previously-connected by-name addednode is only opened when the previous one closes (even if the name starts resolving to something else) * At most one connection is opened per addednode (even if the name resolves to multiple) * Unify the code between ThreadOpenAddedNodeConnections and getaddednodeinfo * Information about open connections is always returned, and the dns argument becomes a dummy * An IP address and inbound/outbound is only reported for the (at most 1) open connection
2016-06-08Merge #8065: Addrman offline attemptsWladimir J. van der Laan
6182d10 Do not increment nAttempts by more than one for every Good connection. (Gregory Maxwell) c769c4a Avoid counting failed connect attempts when probably offline. (Gregory Maxwell)
2016-05-26Merge #8049: Expose information on whether transaction relay is enabled in ↵Pieter Wuille
`getnetwork` 1ab1dc3 rpc: Add `relaytxes` flag to `getnetworkinfo` (Wladimir J. van der Laan) 581ddff net: Add fRelayTxes flag (Wladimir J. van der Laan)
2016-05-26Avoid counting failed connect attempts when probably offline.Gregory Maxwell
If a node is offline failed outbound connection attempts will crank up the addrman counter and effectively blow away our state. This change reduces the problem by only counting attempts made while the node believes it has outbound connections to at least two netgroups. Connect and addnode connections are also not counted, as there is no reason to unequally penalize them for their more frequent connections -- though there should be no real effect from this unless their addnode configureation is later removed. Wasteful repeated connection attempts while only a few connections are up are avoided via nLastTry. This is still somewhat incomplete protection because our outbound peers could be down but not timed out or might all be on 'local' networks (although the requirement for multiple netgroups helps).
2016-05-12rpc: Add `relaytxes` flag to `getnetworkinfo`Wladimir J. van der Laan
Re-work of PR #7841 by dragongem45. Closes #7771.
2016-05-10net: make Ban/Unban/ClearBan functionality consistentCory Fields
- Ban/Unban/ClearBan call uiInterface.BannedListChanged() as necessary - Ban/Unban/ClearBan sync to disk if the operation is user-invoked - Mark node for disconnection automatically when banning - Lock cs_vNodes while setting disconnected - Don't spin in a tight loop while setting disconnected
2016-04-22push back getaddednodeinfo dead valueinstagibbs
2016-04-09RPC: do not print ping info in getpeerinfo when no ping received yet, fix helpPavel Janík
2016-03-31rpc: Register calls where they are definedWladimir J. van der Laan
Split out methods to every module, apart from 'help' and 'stop' which are implemented in rpcserver.cpp itself. - This makes it easier to add or remove RPC commands - no longer everything that includes rpcserver.h has to be rebuilt when there's a change there. - Cleans up `rpc/server.h` by getting rid of the huge cluttered list of function definitions. - Removes most of the bitcoin-specific code from rpcserver.cpp and .h. Continues #7307 for the non-wallet.
2016-01-21move rpc* to rpc/Daniel Cousens