tree checksum vpatch file split hunks

all signers: mircea_popescu trinque asciilifeform mod6 ben_vulpes

antecedents: asciilifeform_aggressive_pushgetblocks

press order:

genesisasciilifeform ben_vulpes mircea_popescu mod6 trinque
bitcoin-asciilifeform.1asciilifeform ben_vulpes mod6
rm_rf_upnpasciilifeform ben_vulpes mod6
bitcoin-asciilifeform.3-turdmeister-alert-snipasciilifeform ben_vulpes mod6
asciilifeform_orphanage_thermonukeasciilifeform ben_vulpes mod6
bitcoin-asciilifeform.2-https_snipsnipasciilifeform ben_vulpes mod6
bitcoin-v0_5_3_1-static_makefile_v002.8asciilifeform ben_vulpes mod6
bitcoin-asciilifeform.4-goodbye-win32asciilifeform ben_vulpes mod6
bitcoin-v0_5_3_1-rev_bump.7asciilifeform ben_vulpes mod6
bitcoin-v0_5_3-db_config.6asciilifeform ben_vulpes mod6
asciilifeform_maxint_locks_correctedasciilifeform ben_vulpes mod6
asciilifeform_tx-orphanage_amputationasciilifeform ben_vulpes mod6
asciilifeform_dnsseed_snipsnipasciilifeform ben_vulpes mod6
asciilifeform_zap_hardcoded_seedsasciilifeform ben_vulpes mod6
asciilifeform_zap_showmyip_crudasciilifeform ben_vulpes mod6
asciilifeform_dns_thermonyukyoolar_kleansingasciilifeform ben_vulpes mod6
asciilifeform_ver_now_5_4_and_irc_is_gone_and_now_must_give_ipasciilifeform ben_vulpes mod6
asciilifeform-kills-integer-retardationasciilifeform ben_vulpes mod6
asciilifeform_and_now_we_have_block_dumper_correctedasciilifeform ben_vulpes mod6
mod6_fix_dumpblock_paramsasciilifeform ben_vulpes mod6
asciilifeform_and_now_we_have_eatblockasciilifeform ben_vulpes mod6
asciilifeform_lets_lose_testnetasciilifeform ben_vulpes mod6
asciilifeform_add_verifyall_optionasciilifeform ben_vulpes mod6
programmable-versionstringben_vulpes mod6
malleus_mikehearnificarumben_vulpes mod6
asciilifeform_malleus_mikehearnificarumasciilifeform
asciilifeform-programmable-versionstringasciilifeform
mod6_der_high_low_sben_vulpes mod6
asciilifeform-programmable-versionstring-fixasciilifeform
makefilesben_vulpes mod6 trinque
asciilifeform_aggressive_pushgetblocksasciilifeform mod6
ben_vulpes_increase_aggression_levelsben_vulpes

patch:

- 0124234FE388C52595CD67F193728E2FE9A8E5025418DF317FE4E4E447572C54FD205578695D61FD7F8D42EFE141EE7DA9C6435EDF2063FFC5ED81FA6D3C64AB
+ AF873D2709B3B975201A350582E23855D08663D8F18908F1FCF0D1377A5E64D20C34E1717D9937C26C73E71BF91BD3469BDD82085D12B4F2A4991FC47BB4ED3E
bitcoin/src/net.cpp
(13 . 8)(13 . 6)
5 using namespace std;
6 using namespace boost;
7
8 static const int MAX_OUTBOUND_CONNECTIONS = 8;
9
10 void ThreadMessageHandler2(void* parg);
11 void ThreadSocketHandler2(void* parg);
12 void ThreadOpenConnections2(void* parg);
(741 . 7)(739 . 7)
14 if (WSAGetLastError() != WSAEWOULDBLOCK)
15 printf("socket error accept failed: %d\n", WSAGetLastError());
16 }
17 else if (nInbound >= GetArg("-maxconnections", 125) - MAX_OUTBOUND_CONNECTIONS)
18 else if (nInbound >= GetArg("-maxconnections", 125))
19 {
20 closesocket(hSocket);
21 }
(830 . 6)(828 . 9)
23 //
24 if (pnode->hSocket == INVALID_SOCKET)
25 continue;
26 if ((nTimeBestReceived - GetTime()) > 20 * 60) {
27 pnode->PushGetBlocks(pindexBest, uint256(0));
28 }
29 if (FD_ISSET(pnode->hSocket, &fdsetSend))
30 {
31 TRY_CRITICAL_BLOCK(pnode->cs_vSend)
(974 . 8)(975 . 7)
33 BOOST_FOREACH(CNode* pnode, vNodes)
34 if (!pnode->fInbound)
35 nOutbound++;
36 int nMaxOutboundConnections = MAX_OUTBOUND_CONNECTIONS;
37 nMaxOutboundConnections = min(nMaxOutboundConnections, (int)GetArg("-maxconnections", 125));
38 int nMaxOutboundConnections = GetArg("-maxconnections", 125);
39 if (nOutbound < nMaxOutboundConnections)
40 break;
41 vnThreadsRunning[1]--;
(991 . 13)(991 . 6)
43 CAddress addrConnect;
44 int64 nBest = INT64_MIN;
45
46 // Only connect to one address per a.b.?.? range.
47 // Do this here so we don't have to critsect vNodes inside mapAddresses critsect.
48 set<unsigned int> setConnected;
49 CRITICAL_BLOCK(cs_vNodes)
50 BOOST_FOREACH(CNode* pnode, vNodes)
51 setConnected.insert(pnode->addr.ip & 0x0000ffff);
52
53 int64 nANow = GetAdjustedTime();
54
55 CRITICAL_BLOCK(cs_mapAddresses)
(1005 . 7)(998 . 7)
57 BOOST_FOREACH(const PAIRTYPE(vector<unsigned char>, CAddress)& item, mapAddresses)
58 {
59 const CAddress& addr = item.second;
60 if (!addr.IsIPv4() || !addr.IsValid() || setConnected.count(addr.ip & 0x0000ffff))
61 if (!addr.IsIPv4() || !addr.IsValid())
62 continue;
63 int64 nSinceLastSeen = nANow - addr.nTime;
64 int64 nSinceLastTry = nANow - addr.nLastTry;