dogecoin/src
Gregory Maxwell 50bd12ce0c Break addnode out from the outbound connection limits.
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.
2017-01-05 19:02:09 +00:00
..
bench Merge #9281: Refactor: Remove using namespace <xxx> from bench/ & test/ sources 2017-01-05 11:32:05 +01:00
compat Increment MIT Licence copyright header year on files modified in 2016 2016-12-31 11:01:21 -07:00
config
consensus Increment MIT Licence copyright header year on files modified in 2016 2016-12-31 11:01:21 -07:00
crypto Increment MIT Licence copyright header year on files modified in 2016 2016-12-31 11:01:21 -07:00
leveldb Merge in LevelDB 1.19 changes 2016-12-01 16:14:45 -08:00
obj
obj-test
policy Merge #9288: Fix a bug if the min fee is 0 for FeeFilterRounder 2017-01-04 12:33:56 +01:00
primitives Merge #9283: A few more CTransactionRef optimizations 2017-01-04 12:23:10 +01:00
qt Merge #9475: Let autoconf detect presence of EVP_MD_CTX_new 2017-01-05 10:28:47 +01:00
rpc Break addnode out from the outbound connection limits. 2017-01-05 19:02:09 +00:00
script Increment MIT Licence copyright header year on files modified in 2016 2016-12-31 11:01:21 -07:00
secp256k1 Update libsecp256k1 to master 2016-12-12 11:08:47 -08:00
support Merge #9387: [Refactor] RAII of libevent stuff using unique ptrs with deleters 2017-01-05 11:11:17 +01:00
test Merge #9281: Refactor: Remove using namespace <xxx> from bench/ & test/ sources 2017-01-05 11:32:05 +01:00
univalue Merge commit '2ca7faab4205822b06dc2ab2bbda0a9a70fce7e0' into HEAD 2016-09-30 19:58:11 +02:00
wallet Mark the minconf parameter to move as ignored 2017-01-04 08:48:21 -08:00
zmq Increment MIT Licence copyright header year on files modified in 2016 2016-12-31 11:01:21 -07:00
.clang-format
addrdb.cpp Increment MIT Licence copyright header year on files modified in 2016 2016-12-31 11:01:21 -07:00
addrdb.h Increment MIT Licence copyright header year on files modified in 2016 2016-12-31 11:01:21 -07:00
addrman.cpp Increment MIT Licence copyright header year on files modified in 2016 2016-12-31 11:01:21 -07:00
addrman.h Increment MIT Licence copyright header year on files modified in 2016 2016-12-31 11:01:21 -07:00
amount.cpp Increment MIT Licence copyright header year on files modified in 2016 2016-12-31 11:01:21 -07:00
amount.h Increment MIT Licence copyright header year on files modified in 2016 2016-12-31 11:01:21 -07:00
arith_uint256.cpp Increment MIT Licence copyright header year on files modified in 2016 2016-12-31 11:01:21 -07:00
arith_uint256.h Increment MIT Licence copyright header year on files modified in 2016 2016-12-31 11:01:21 -07:00
base58.cpp Increment MIT Licence copyright header year on files modified in 2016 2016-12-31 11:01:21 -07:00
base58.h
bitcoin-cli-res.rc
bitcoin-cli.cpp Merge #9387: [Refactor] RAII of libevent stuff using unique ptrs with deleters 2017-01-05 11:11:17 +01:00
bitcoin-tx-res.rc
bitcoin-tx.cpp Increment MIT Licence copyright header year on files modified in 2016 2016-12-31 11:01:21 -07:00
bitcoind-res.rc
bitcoind.cpp Increment MIT Licence copyright header year on files modified in 2016 2016-12-31 11:01:21 -07:00
blockencodings.cpp Make FillBlock consume txn_available to avoid shared_ptr copies 2016-12-21 18:18:28 -08:00
blockencodings.h Make FillBlock consume txn_available to avoid shared_ptr copies 2016-12-21 18:18:28 -08:00
bloom.cpp Increment MIT Licence copyright header year on files modified in 2016 2016-12-31 11:01:21 -07:00
bloom.h Increment MIT Licence copyright header year on files modified in 2016 2016-12-31 11:01:21 -07:00
chain.cpp Increment MIT Licence copyright header year on files modified in 2016 2016-12-31 11:01:21 -07:00
chain.h Increment MIT Licence copyright header year on files modified in 2016 2016-12-31 11:01:21 -07:00
chainparams.cpp Increment MIT Licence copyright header year on files modified in 2016 2016-12-31 11:01:21 -07:00
chainparams.h Increment MIT Licence copyright header year on files modified in 2016 2016-12-31 11:01:21 -07:00
chainparamsbase.cpp
chainparamsbase.h
chainparamsseeds.h
checkpoints.cpp Increment MIT Licence copyright header year on files modified in 2016 2016-12-31 11:01:21 -07:00
checkpoints.h Increment MIT Licence copyright header year on files modified in 2016 2016-12-31 11:01:21 -07:00
checkqueue.h
clientversion.cpp Increment MIT Licence copyright header year on files modified in 2016 2016-12-31 11:01:21 -07:00
clientversion.h Increment MIT Licence copyright header year on files modified in 2016 2016-12-31 11:01:21 -07:00
coins.cpp Merge #9107: Safer modify new coins 2017-01-04 11:56:17 -08:00
coins.h Merge #9107: Safer modify new coins 2017-01-04 11:56:17 -08:00
compat.h Increment MIT Licence copyright header year on files modified in 2016 2016-12-31 11:01:21 -07:00
compressor.cpp
compressor.h Increment MIT Licence copyright header year on files modified in 2016 2016-12-31 11:01:21 -07:00
core_io.h Increment MIT Licence copyright header year on files modified in 2016 2016-12-31 11:01:21 -07:00
core_memusage.h Increment MIT Licence copyright header year on files modified in 2016 2016-12-31 11:01:21 -07:00
core_read.cpp Increment MIT Licence copyright header year on files modified in 2016 2016-12-31 11:01:21 -07:00
core_write.cpp Increment MIT Licence copyright header year on files modified in 2016 2016-12-31 11:01:21 -07:00
cuckoocache.h Add CuckooCache implementation and replace the sigcache map_type with it 2016-12-14 16:02:05 -05:00
dbwrapper.cpp Increment MIT Licence copyright header year on files modified in 2016 2016-12-31 11:01:21 -07:00
dbwrapper.h Increment MIT Licence copyright header year on files modified in 2016 2016-12-31 11:01:21 -07:00
hash.cpp Increment MIT Licence copyright header year on files modified in 2016 2016-12-31 11:01:21 -07:00
hash.h Increment MIT Licence copyright header year on files modified in 2016 2016-12-31 11:01:21 -07:00
httprpc.cpp Increment MIT Licence copyright header year on files modified in 2016 2016-12-31 11:01:21 -07:00
httprpc.h
httpserver.cpp Increment MIT Licence copyright header year on files modified in 2016 2016-12-31 11:01:21 -07:00
httpserver.h Increment MIT Licence copyright header year on files modified in 2016 2016-12-31 11:01:21 -07:00
indirectmap.h prepend license statement to indirectmap 2016-07-27 16:27:07 -07:00
init.cpp Break addnode out from the outbound connection limits. 2017-01-05 19:02:09 +00:00
init.h Increment MIT Licence copyright header year on files modified in 2016 2016-12-31 11:01:21 -07:00
key.cpp Increment MIT Licence copyright header year on files modified in 2016 2016-12-31 11:01:21 -07:00
key.h Increment MIT Licence copyright header year on files modified in 2016 2016-12-31 11:01:21 -07:00
keystore.cpp Increment MIT Licence copyright header year on files modified in 2016 2016-12-31 11:01:21 -07:00
keystore.h
limitedmap.h Increment MIT Licence copyright header year on files modified in 2016 2016-12-31 11:01:21 -07:00
Makefile.am Merge #9387: [Refactor] RAII of libevent stuff using unique ptrs with deleters 2017-01-05 11:11:17 +01:00
Makefile.bench.include bench: Add support for measuring CPU cycles 2016-11-22 12:20:57 +01:00
Makefile.leveldb.include Merge #8826: Do not include env_win.cc on non-Windows systems 2016-09-29 17:27:28 +02:00
Makefile.qt.include [qt] Add more sources to translate 2017-01-04 12:12:43 +01:00
Makefile.qttest.include Uses built-in byte swap if available (Apple) and if bswap_XX is undefined. 2016-12-17 12:27:00 +09:00
Makefile.test.include Merge #9387: [Refactor] RAII of libevent stuff using unique ptrs with deleters 2017-01-05 11:11:17 +01:00
memusage.h Increment MIT Licence copyright header year on files modified in 2016 2016-12-31 11:01:21 -07:00
merkleblock.cpp Increment MIT Licence copyright header year on files modified in 2016 2016-12-31 11:01:21 -07:00
merkleblock.h Increment MIT Licence copyright header year on files modified in 2016 2016-12-31 11:01:21 -07:00
miner.cpp Increment MIT Licence copyright header year on files modified in 2016 2016-12-31 11:01:21 -07:00
miner.h Increment MIT Licence copyright header year on files modified in 2016 2016-12-31 11:01:21 -07:00
net.cpp Break addnode out from the outbound connection limits. 2017-01-05 19:02:09 +00:00
net.h Break addnode out from the outbound connection limits. 2017-01-05 19:02:09 +00:00
net_processing.cpp Break addnode out from the outbound connection limits. 2017-01-05 19:02:09 +00:00
net_processing.h Merge #9289: net: drop boost::thread_group 2017-01-04 12:21:53 +01:00
netaddress.cpp Increment MIT Licence copyright header year on files modified in 2016 2016-12-31 11:01:21 -07:00
netaddress.h Increment MIT Licence copyright header year on files modified in 2016 2016-12-31 11:01:21 -07:00
netbase.cpp Merge #9289: net: drop boost::thread_group 2017-01-04 12:21:53 +01:00
netbase.h Merge #9289: net: drop boost::thread_group 2017-01-04 12:21:53 +01:00
netmessagemaker.h net: add CVectorWriter and CNetMsgMaker 2016-11-25 12:09:58 -05:00
noui.cpp Increment MIT Licence copyright header year on files modified in 2016 2016-12-31 11:01:21 -07:00
noui.h
pow.cpp Increment MIT Licence copyright header year on files modified in 2016 2016-12-31 11:01:21 -07:00
pow.h Increment MIT Licence copyright header year on files modified in 2016 2016-12-31 11:01:21 -07:00
prevector.h Increment MIT Licence copyright header year on files modified in 2016 2016-12-31 11:01:21 -07:00
protocol.cpp Increment MIT Licence copyright header year on files modified in 2016 2016-12-31 11:01:21 -07:00
protocol.h Increment MIT Licence copyright header year on files modified in 2016 2016-12-31 11:01:21 -07:00
pubkey.cpp Increment MIT Licence copyright header year on files modified in 2016 2016-12-31 11:01:21 -07:00
pubkey.h Increment MIT Licence copyright header year on files modified in 2016 2016-12-31 11:01:21 -07:00
random.cpp Increment MIT Licence copyright header year on files modified in 2016 2016-12-31 11:01:21 -07:00
random.h Increment MIT Licence copyright header year on files modified in 2016 2016-12-31 11:01:21 -07:00
rest.cpp Increment MIT Licence copyright header year on files modified in 2016 2016-12-31 11:01:21 -07:00
reverselock.h Increment MIT Licence copyright header year on files modified in 2016 2016-12-31 11:01:21 -07:00
scheduler.cpp Increment MIT Licence copyright header year on files modified in 2016 2016-12-31 11:01:21 -07:00
scheduler.h
serialize.h Increment MIT Licence copyright header year on files modified in 2016 2016-12-31 11:01:21 -07:00
streams.h Increment MIT Licence copyright header year on files modified in 2016 2016-12-31 11:01:21 -07:00
sync.cpp Increment MIT Licence copyright header year on files modified in 2016 2016-12-31 11:01:21 -07:00
sync.h Break addnode out from the outbound connection limits. 2017-01-05 19:02:09 +00:00
threadinterrupt.cpp net: add CThreadInterrupt and InterruptibleSleep 2017-01-03 17:53:09 -05:00
threadinterrupt.h net: add CThreadInterrupt and InterruptibleSleep 2017-01-03 17:53:09 -05:00
threadsafety.h
timedata.cpp Increment MIT Licence copyright header year on files modified in 2016 2016-12-31 11:01:21 -07:00
timedata.h Increment MIT Licence copyright header year on files modified in 2016 2016-12-31 11:01:21 -07:00
tinyformat.h util: Update tinyformat 2016-06-27 18:17:27 +02:00
torcontrol.cpp Increment MIT Licence copyright header year on files modified in 2016 2016-12-31 11:01:21 -07:00
torcontrol.h
txdb.cpp Increment MIT Licence copyright header year on files modified in 2016 2016-12-31 11:01:21 -07:00
txdb.h Increment MIT Licence copyright header year on files modified in 2016 2016-12-31 11:01:21 -07:00
txmempool.cpp Merge #9288: Fix a bug if the min fee is 0 for FeeFilterRounder 2017-01-04 12:33:56 +01:00
txmempool.h Merge #8747: [rpc] Fix transaction size comments and RPC help text. 2017-01-05 12:06:42 +01:00
ui_interface.cpp [wallet] Add high transaction fee warnings 2016-09-26 01:11:27 +02:00
ui_interface.h Increment MIT Licence copyright header year on files modified in 2016 2016-12-31 11:01:21 -07:00
uint256.cpp Increment MIT Licence copyright header year on files modified in 2016 2016-12-31 11:01:21 -07:00
uint256.h Increment MIT Licence copyright header year on files modified in 2016 2016-12-31 11:01:21 -07:00
undo.h Increment MIT Licence copyright header year on files modified in 2016 2016-12-31 11:01:21 -07:00
util.cpp Increment MIT Licence copyright header year on files modified in 2016 2016-12-31 11:01:21 -07:00
util.h Merge #9417: Do not evaluate hidden LogPrint arguments 2017-01-05 10:49:00 +01:00
utilmoneystr.cpp
utilmoneystr.h
utilstrencodings.cpp Increment MIT Licence copyright header year on files modified in 2016 2016-12-31 11:01:21 -07:00
utilstrencodings.h Increment MIT Licence copyright header year on files modified in 2016 2016-12-31 11:01:21 -07:00
utiltime.cpp Increment MIT Licence copyright header year on files modified in 2016 2016-12-31 11:01:21 -07:00
utiltime.h
validation.cpp Merge #9107: Safer modify new coins 2017-01-04 11:56:17 -08:00
validation.h Merge #9283: A few more CTransactionRef optimizations 2017-01-04 12:23:10 +01:00
validationinterface.cpp Increment MIT Licence copyright header year on files modified in 2016 2016-12-31 11:01:21 -07:00
validationinterface.h Increment MIT Licence copyright header year on files modified in 2016 2016-12-31 11:01:21 -07:00
version.h Increment MIT Licence copyright header year on files modified in 2016 2016-12-31 11:01:21 -07:00
versionbits.cpp RPC: augment getblockchaininfo bip9_softforks data 2016-10-19 09:08:39 -04:00
versionbits.h RPC: augment getblockchaininfo bip9_softforks data 2016-10-19 09:08:39 -04:00
warnings.cpp Move GetWarnings() into its own file. 2016-12-03 07:17:34 +00:00
warnings.h Move GetWarnings() into its own file. 2016-12-03 07:17:34 +00:00