aboutsummaryrefslogtreecommitdiff
path: root/src/rpc/net.cpp
Commit message (Collapse)AuthorAgeFilesLines
* rpc: add feefilter to peers from getpeerinfoPatrick Lodder2021-08-141-0/+3
| | | | | | Exposes information about the feefilter the peer sets to us, so that we can make better informed decisions when a transaction does not get relayed.
* Initial back end framework to separate wallet and relay fees + dust.Michi Lumin2021-07-301-1/+1
|
* Introduce basic Dogecoin brandingRoss Nicoll2019-03-251-5/+5
|
* Return correct error codes in setban().John Newbery2017-06-051-2/+2
| | | | | | | | | | | | | | | | The setban() RPC was returning misleading or incorrect error codes (for example RPC_CLIENT_NODE_ALREADY_ADDED when an invalid IP address was entered). This commit fixes those error codes: - RPC_CLIENT_INVALID_IP_OR_SUBNET should be returned if the client enters an invalid IP address or subnet. This commit also updates the test cases to explicitly test the error code. This commit also adds a testcase for trying to setban on an invalid subnet. Github-Pull: #9853 Rebased-From: a012087667edb35a36f25ae06b42b1644d80e649
* [rpc] rename disconnectnode argumentJohn Newbery2017-04-141-4/+4
| | | | | Github-Pull: #10204 Rebased-From: 883154cbcb306dcc6205fe349c7056ced1f6c5fc
* Merge #9615: Wallet incremental feeWladimir J. van der Laan2017-01-301-0/+3
|\ | | | | | | | | | | | | | | | | | | | | 4b189c1 Change bumpfee result value from 'oldfee' to 'origfee'. (Alex Morcos) 0c0c63f Introduce WALLET_INCREMENTAL_RELAY_FEE (Alex Morcos) e8021ec Use CWallet::GetMinimumFee in bumpfee (Alex Morcos) ae9719a Refactor GetMinimumFee to give option of providing targetFee (Alex Morcos) fe8e8ef [rpc] Add incremental relay fee to getnetworkinfo (Alex Morcos) 6b331e6 Fix to have miner test aware of new separate block min tx fee (Alex Morcos) de6400d Fix missing use of dustRelayFee (Alex Morcos) 5b15870 Use incrementalRelayFee for BIP 125 replacement (Alex Morcos)
| * [rpc] Add incremental relay fee to getnetworkinfoAlex Morcos2017-01-201-0/+3
| |
* | [trivial] Fix typos in commentspracticalswift2017-01-271-1/+1
|/
* RPC help updatedMichael Rotarius2017-01-111-5/+7
|
* Merge #8811: rpc: Add support for JSON-RPC named argumentsWladimir J. van der Laan2017-01-101-15/+17
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4e7e2e1 Update RPC argument names (John Newbery) 481f289 rpc: Named argument support for bitcoin-cli (Wladimir J. van der Laan) 9adb4e1 rpc: Argument name consistency (Wladimir J. van der Laan) 8d713f7 rpc: Named arguments for rawtransaction calls (Wladimir J. van der Laan) 37a166f rpc: Named arguments for wallet calls (Wladimir J. van der Laan) 78b684f rpc: Named arguments for mining calls (Wladimir J. van der Laan) b8ebc59 rpc: Named arguments for net calls (Wladimir J. van der Laan) 2ca9dcd test: Add test for RPC named arguments (Wladimir J. van der Laan) fba1a61 rpc: Named arguments for misc calls (Wladimir J. van der Laan) 286ec08 rpc: Add 'echo' call for testing (Wladimir J. van der Laan) 495eb44 rpc: Named arguments for blockchain calls (Wladimir J. van der Laan) 6f1c76a rpc: Support named arguments (Wladimir J. van der Laan) 5865d41 authproxy: Add support for RPC named arguments (Wladimir J. van der Laan)
| * Update RPC argument namesJohn Newbery2017-01-101-1/+1
| |
| * rpc: Named arguments for net callsWladimir J. van der Laan2017-01-051-15/+17
| | | | | | | | Also add a more descriptive message for `setnetworkactive`.
* | RPC help documentation for addnode peerinfo.Gregory Maxwell2017-01-051-0/+1
| | | | | | | | Also adds a comment about the netgroup exclusion behavior.
* | Break addnode out from the outbound connection limits.Gregory Maxwell2017-01-051-0/+1
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously addnodes were in competition with outbound connections for access to the eight outbound slots. One result of this is that frequently a node with several addnode configured peers would end up connected to none of them, because while the addnode loop was in its two minute sleep the automatic connection logic would fill any free slots with random peers. This is particularly unwelcome to users trying to maintain links to specific nodes for fast block relay or purposes. Another result is that a group of nine or more nodes which are have addnode configured towards each other can become partitioned from the public network. This commit introduces a new limit of eight connections just for addnode peers which is not subject to any of the other connection limitations (including maxconnections). The choice of eight is sufficient so that under no condition would a user find themselves connected to fewer addnoded peers than previously. It is also low enough that users who are confused about the significance of more connections and have gotten too copy-and-paste happy will not consume more than twice the slot usage of a typical user. Any additional load on the network resulting from this will likely be offset by a reduction in users applying even more wasteful workaround for the prior behavior. The retry delays are reduced to avoid nodes sitting around without their added peers up, but are still sufficient to prevent overly aggressive repeated connections. The reduced delays also make the system much more responsive to the addnode RPC. Ban-disconnects are also exempted for peers added via addnode since the outbound addnode logic ignores bans. Previously it would ban an addnode then immediately reconnect to it. A minor change was also made to CSemaphoreGrant so that it is possible to re-acquire via an object whos grant was moved.
* Increment MIT Licence copyright header year on files modified in 2016isle29832016-12-311-1/+1
| | | | | | Edited via: $ contrib/devtools/copyright_header.py update .
* Rename the remaining main.{h,cpp} to validation.{h,cpp}Matt Corallo2016-12-021-1/+1
|
* Move network-msg-processing code out of main to its own fileMatt Corallo2016-12-021-0/+1
|
* Merge #8996: Network activity toggleJonas Schnelli2016-11-111-1/+23
|\ | | | | | | | | | | | | | | | | 19f46f1 Qt: New network_disabled icon (Luke Dashjr) 54cf997 RPC/Net: Use boolean consistently for networkactive, and remove from getinfo (Luke Dashjr) b2b33d9 Overhaul network activity toggle (Jonas Schnelli) 32efa79 Qt: Add GUI feedback and control of network activity state. (Jon Lund Steffensen) e38993b RPC: Add "togglenetwork" method to toggle network activity temporarily (Jon Lund Steffensen) 7c9a98a Allow network activity to be temporarily suspended. (Jon Lund Steffensen)
| * RPC/Net: Use boolean consistently for networkactive, and remove from getinfoLuke Dashjr2016-10-241-4/+4
| |
| * Overhaul network activity toggleJonas Schnelli2016-10-241-7/+10
| | | | | | | | | | | | - Rename RPC command "togglenetwork" to "setnetworkactive (true|false)" - Add simple test case - GUI toggle added to connections icon in statusbar
| * RPC: Add "togglenetwork" method to toggle network activity temporarilyJon Lund Steffensen2016-10-241-0/+19
| | | | | | | | | | RPC command "togglenetwork" toggles network and returns new state after command. RPC command "getinfo" returns "networkactive" field in output.
* | fix getnettotals RPC description about timemillis.Masahiko Hyuga2016-11-101-1/+1
| |
* | [RPC] Give RPC commands more information about the RPC requestJonas Schnelli2016-10-191-36/+36
| |
* | Display minimum ping in debug window.R E Broadley2016-10-151-2/+2
|/
* Made the ForEachNode* functions in src/net.cpp more pragmatic and self ↵Jeremy Rubin2016-09-081-1/+0
| | | | documenting
* net: move nLocalServices/nRelevantServices to CConnmanCory Fields2016-09-081-1/+2
| | | | | These are in-turn passed to CNode at connection time. This allows us to offer different services to different peers (or test the effects of doing so).
* net: move send/recv statistics to CConnmanCory Fields2016-09-081-8/+10
|
* net: create generic functor accessors and move vNodes to CConnmanCory Fields2016-09-081-6/+7
|
* net: Add most functions needed for vNodes to CConnmanCory Fields2016-09-081-23/+13
|
* net: move added node functions to CConnmanCory Fields2016-09-081-11/+6
|
* net: move ban and addrman functions into CConnmanCory Fields2016-09-081-5/+12
|
* net: move OpenNetworkConnection into CConnmanCory Fields2016-09-081-1/+4
|
* Make the dummy argument to getaddednodeinfo optionalPieter Wuille2016-09-011-6/+5
|
* Merge #8163: Do not shadow global RPC table variable (tableRPC)Wladimir J. van der Laan2016-08-311-2/+2
|\ | | | | | | de1bbe3 Do not shadow global RPC table variable (tableRPC) (Pavel Janík)
| * Do not shadow global RPC table variable (tableRPC)Pavel Janík2016-08-251-2/+2
| |
* | Merge #8512: Trivial: Corrected JSON typo on setban of net.cppWladimir J. van der Laan2016-08-171-1/+1
|\ \ | |/ |/| | | 6ffd996 Corrected JSON typo on setban of net.cpp (Sev)
| * Corrected JSON typo on setban of net.cppSev2016-08-141-1/+1
| |
* | net: Split resolving out of CSubNetCory Fields2016-07-311-1/+1
| |
* | net: Split resolving out of CNetAddrCory Fields2016-07-311-2/+5
|/
* Rework addnode behaviourPieter Wuille2016-06-131-73/+22
| | | | | | | | | | * 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
* Merge #8065: Addrman offline attemptsWladimir J. van der Laan2016-06-081-1/+1
|\ | | | | | | | | 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)
| * Avoid counting failed connect attempts when probably offline.Gregory Maxwell2016-05-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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).
* | Merge #8049: Expose information on whether transaction relay is enabled in ↵Pieter Wuille2016-05-261-0/+2
|\ \ | |/ |/| | | | | | | | | `getnetwork` 1ab1dc3 rpc: Add `relaytxes` flag to `getnetworkinfo` (Wladimir J. van der Laan) 581ddff net: Add fRelayTxes flag (Wladimir J. van der Laan)
| * rpc: Add `relaytxes` flag to `getnetworkinfo`Wladimir J. van der Laan2016-05-121-0/+2
| | | | | | | | | | Re-work of PR #7841 by dragongem45. Closes #7771.
* | net: make Ban/Unban/ClearBan functionality consistentCory Fields2016-05-101-10/+0
|/ | | | | | | | - 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
* push back getaddednodeinfo dead valueinstagibbs2016-04-221-0/+1
|
* RPC: do not print ping info in getpeerinfo when no ping received yet, fix helpPavel Janík2016-04-091-5/+7
|
* rpc: Register calls where they are definedWladimir J. van der Laan2016-03-311-0/+22
| | | | | | | | | | | | 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.
* move rpc* to rpc/Daniel Cousens2016-01-211-0/+628