aboutsummaryrefslogtreecommitdiff
path: root/src/net.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
| * CNodeRef copy constructor and assignment operatorPatrick Strateman2015-08-251-0/+16
| |
| * Return false early if vEvictionCandidates is emptyPatrick Strateman2015-08-221-3/+8
| |
| * Better support for nodes with non-standard nMaxConnectionsPatrick Strateman2015-08-221-1/+1
| |
| * RAII wrapper for CNode*Patrick Strateman2015-08-221-7/+18
| |
| * Add comments to AttemptToEvictConnectionPatrick Strateman2015-08-221-0/+7
| |
| * Remove redundant whiteconnections optionPatrick Strateman2015-08-221-1/+0
| |
| * Prefer to disconnect peers in favor of whitelisted peersPatrick Strateman2015-08-221-3/+6
| |
| * AttemptToEvictConnectionPatrick Strateman2015-08-221-10/+106
| |
| * Refactor: Move failure conditions to the top of AcceptConnectionPatrick Strateman2015-08-221-6/+6
| |
| * Refactor: Bail early in AcceptConnectionPatrick Strateman2015-08-221-14/+21
| |
| * Refactor: AcceptConnectionPatrick Strateman2015-08-221-58/+62
| |
* | Merge pull request #6583Wladimir J. van der Laan2015-08-311-1/+5
|\ \ | | | | | | | | | 9f3e48e add support for miniupnpc api version 14 (Pavel Vasin)
| * | add support for miniupnpc api version 14Pavel Vasin2015-08-231-1/+5
| |/ | | | | | | The value of new arg ttl is set to 2 as it's recommended default.
* | Make sure LogPrint strings are line-terminatedJ Ross Nicoll2015-08-291-1/+1
| |
* | net: Set SO_REUSEADDR for Windows tooCory Fields2015-08-251-1/+3
|/ | | | | | When running the rpc tests in Wine, nodes often fail to listen on localhost due to a stale socket from a previous run. This aligns the behavior with other platforms.
* typofixes (found by misspell_fixer)Veres Lajos2015-08-101-1/+1
|
* Merge pull request #6462Wladimir J. van der Laan2015-08-051-1/+2
|\ | | | | | | | | 7b79cbd limit total length of user agent comments (Pavol Rusnak) 557f8ea implement uacomment config parameter which can add comments to user agent as per BIP-0014 (Pavol Rusnak)
| * limit total length of user agent commentsPavol Rusnak2015-08-051-1/+2
| | | | | | | | Reworked-By: Wladimir J. van der Laan <[email protected]>
| * implement uacomment config parameterPavol Rusnak2015-07-311-1/+1
| | | | | | | | which can add comments to user agent as per BIP-0014
* | Consolidate individual references to the current maximum peer connectionMatt Quinn2015-08-031-1/+1
| | | | | | | | value of 125 into a single constant declaration.
* | Make CRollingBloomFilter set nTweak for youPeter Todd2015-07-271-1/+1
|/ | | | | | | | | | | | While CBloomFilter is usually used with an explicitly set nTweak, CRollingBloomFilter is only used internally. Requiring every caller to set nTweak is error-prone and redundant; better to have the class handle that for you with a high-quality randomness source. Additionally when clearing the filter it makes sense to change nTweak as well to recover from a bad setting, e.g. due to insufficient randomness at initialization, so the clear() method is replaced by a reset() method that sets a new, random, nTweak value.
* Merge pull request #5697Wladimir J. van der Laan2015-07-271-1/+3
|\ | | | | | | | | 60c8bac Includes: Cleanup around net main and wallet (Jorge Timón) 9dd793f TRIVIAL: Missing includes (Jorge Timón)
| * Includes: Cleanup around net main and walletJorge Timón2015-07-231-1/+3
| | | | | | | | | | | | -Move from .h to .cpp: in main, net and wallet -Remove unnecessary #include "main.h" -Cleanup some wallet files includes
* | Merge pull request #6287Wladimir J. van der Laan2015-07-231-1/+3
|\ \ | |/ |/| | | | | | | a794284 locking: add a quick example of GUARDED_BY (Cory Fields) 2b890dd locking: fix a few small issues uncovered by -Wthread-safety (Cory Fields) cd27bba locking: teach Clang's -Wthread-safety to cope with our scoped lock macros (Cory Fields)
| * locking: fix a few small issues uncovered by -Wthread-safetyCory Fields2015-06-161-1/+3
| | | | | | | | | | | | - rpcwallet: No need to lock twice here - openssl: Clang doesn't understand selective lock/unlock here. Ignore it. - CNode: Fix a legitimate (though very unlikely) locking bug.
* | Test whether created sockets are select()ablePieter Wuille2015-07-101-0/+18
| |
* | Merge pull request #5288Wladimir J. van der Laan2015-07-101-2/+12
|\ \ | | | | | | | | | e3cae52 Added -whiteconnections=<n> option (Josh Lehan)
| * | Added -whiteconnections=<n> optionJosh Lehan2015-06-141-1/+11
| |/ | | | | | | | | | | This sets aside a number of connection slots for whitelisted peers, useful for ensuring your local users and miners can always get in, even if your limit on inbound connections has already been reached.
* | Adding CSubNet constructor over a single CNetAddrJonas Schnelli2015-07-021-2/+2
| |
* | use CBanEntry as object container for banned nodesJonas Schnelli2015-07-021-23/+30
| | | | | | | | | | | | | | - added a reason enum for a ban - added creation time for a ban Using CBanEntry as container will keep banlist.dat extenable.
* | CAddrDB/CBanDB: change filesize variables from int to uint64_tJonas Schnelli2015-07-021-8/+8
| |
* | banlist.dat: store banlist on diskJonas Schnelli2015-07-021-2/+184
| |
* | fix missing lock in CNode::ClearBanned()Jonas Schnelli2015-06-191-0/+1
| |
* | setban: rewrite to UniValue, allow absolute bantimeJonas Schnelli2015-06-171-4/+4
| |
* | [RPC] extend setban to allow subnetsJonas Schnelli2015-06-171-7/+43
| |
* | [net] remove unused return type bool from CNode::Ban()Jonas Schnelli2015-06-171-3/+1
| |
* | [net] extend core functionallity for ban/unban/listbanJonas Schnelli2015-06-171-6/+21
|/
* use const references where appropriatePhilip Kaufmann2015-06-041-11/+10
|
* [net, trivial] explicitly use std::string for FindNodePhilip Kaufmann2015-05-311-2/+2
| | | | | - in OpenNetworkConnection we have a FindNode call, which gets a const char*, wheras we only have defined a FindNode for std::string
* Use CScheduler for net's DumpAddressesGavin Andresen2015-05-141-2/+3
| | | | | Instead of starting Yet Another Thread to dump addresses, use CScheduler to do it.
* Use ring buffer of set iterators instead of deque of copies in mrusetPieter Wuille2015-04-301-2/+4
|
* Replace mruset setAddrKnown with CRollingBloomFilter addrKnownGavin Andresen2015-04-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | Use a probabilistic bloom filter to keep track of which addresses we think we have given our peers, instead of a list. This uses much less memory, at the cost of sometimes failing to relay an address to a peer-- worst case if the bloom filter happens to be as full as it gets, 1-in-1,000. Measured memory usage of a full mruset setAddrKnown: 650Kbytes Constant memory usage of CRollingBloomFilter addrKnown: 37Kbytes. This will also help heap fragmentation, because the 37K of storage is allocated when a CNode is created (when a connection to a peer is established) and then there is no per-item-remembered memory allocation. I plan on testing by restarting a full node with an empty peers.dat, running a while with -debug=addrman and -debug=net, and making sure that the 'addr' message traffic out is reasonable. (suggestions for better tests welcome)
* Merge pull request #6059Wladimir J. van der Laan2015-04-301-1/+22
|\ | | | | | | 739d615 chainparams: use SeedSpec6's rather than CAddress's for fixed seeds (Cory Fields)
| * chainparams: use SeedSpec6's rather than CAddress's for fixed seedsCory Fields2015-04-241-1/+22
| | | | | | | | This negates the need for CAddress here at all
* | replace absolute sleep with conditional waitpstratem2015-04-271-2/+8
|/
* nLastTry is only used for addrman entriesPieter Wuille2015-04-191-1/+1
| | | | No need to define it for every CAddress, as it's memory only anyway.
* Merge pull request #5941Wladimir J. van der Laan2015-04-011-2/+1
|\ | | | | | | | | | | | | | | | | 1d21ba2 Scale up addrman (Pieter Wuille) c6a63ce Always use a 50% chance to choose between tried and new entries (Pieter Wuille) f68ba3f Do not bias outgoing connections towards fresh addresses (Pieter Wuille) a8ff7c6 Simplify hashing code (Pieter Wuille) e6b343d Make addrman's bucket placement deterministic. (Pieter Wuille) b23add5 Switch addrman key from vector to uint256 (Pieter Wuille)
| * Always use a 50% chance to choose between tried and new entriesPieter Wuille2015-03-231-2/+1
| | | | | | | | | | | | | | This change was suggested as Countermeasure 2 in Eclipse Attacks on Bitcoin’s Peer-to-Peer Network, Ethan Heilman, Alison Kendler, Aviv Zohar, Sharon Goldberg. ePrint Archive Report 2015/263. March 2015.
* | don't trickle for whitelisted nodesRuben de Vries2015-03-241-1/+1
|/
* Merge pull request #5151Pieter Wuille2015-03-071-2/+2
|\ | | | | | | eec3713 make CMessageHeader a dumb storage class (Cory Fields)