Connect to an extra outbound peer if our tip is stale
commitac7b37cd2bd612a64a4009ba82f1cd1d57f37434
authorSuhas Daftuar <sdaftuar@gmail.com>
Tue, 24 Oct 2017 20:56:07 +0000 (24 16:56 -0400)
committerSuhas Daftuar <sdaftuar@gmail.com>
Thu, 2 Nov 2017 16:39:14 +0000 (2 12:39 -0400)
treecd7e7a674a9de4e5d93fea61c869fb7a03180725
parentdb32a6589720e5b15931cef82e477118dfd92669
Connect to an extra outbound peer if our tip is stale

If our tip hasn't updated in a while, that may be because our peers are
not relaying blocks to us that we would consider valid. Allow connection
to an additional outbound peer in that circumstance.

Also, periodically check to see if we are exceeding our target number of
outbound peers, and disconnect the one which has least recently
announced a new block to us (choosing the newest such peer in the case
of tie).
src/init.cpp
src/net.cpp
src/net_processing.cpp
src/net_processing.h
src/test/test_bitcoin.cpp