tree checksum vpatch file split hunks
all signers: mircea_popescu trinque asciilifeform ben_vulpes mod6
antecedents: bitcoin-asciilifeform.4-goodbye-win32
press order:
patch:
(167 . 7)(167 . 6)- C67FDD55E9D9D6B4973122B76729D7E83A456A8DC410F1C130CFFBFD9F626C47CA7E8006BDE912D9E0BD0A4B8457E895270D4A0EFD22C4A199CD52FFD95B10DD
5 " -connect=<ip> \t\t " + _("Connect only to the specified node\n") +
6 " -noirc \t " + _("Don't find peers using internet relay chat\n") +
7 " -nolisten \t " + _("Don't accept connections from outside\n") +
8 " -nodnsseed \t " + _("Don't bootstrap list of peers using DNS\n") +
9 " -banscore=<n> \t " + _("Threshold for disconnecting misbehaving peers (default: 100)\n") +
10 " -bantime=<n> \t " + _("Number of seconds to keep misbehaving peers from reconnecting (default: 86400)\n") +
11 " -maxreceivebuffer=<n>\t " + _("Maximum per-connection receive buffer, <n>*1000 bytes (default: 10000)\n") +
(415 . 7)(414 . 6)
13 // Note: the GetBoolArg() calls for all of these must happen later.
14 SoftSetArg("-nolisten", true);
15 SoftSetArg("-noirc", true);
16 SoftSetArg("-nodnsseed", true);
17 SoftSetArg("-dns", false);
18 }
19
(19 . 7)(19 . 6)
24 void ThreadMessageHandler2(void* parg);
25 void ThreadSocketHandler2(void* parg);
26 void ThreadOpenConnections2(void* parg);
27 void ThreadDNSAddressSeed2(void* parg);
28 bool OpenNetworkConnection(const CAddress& addrConnect);
29
30
(1067 . 92)(1066 . 6)
32 }
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52 static const char *strDNSSeed[] = {
53 "bitseed.xf2.org",
54 "dnsseed.bluematt.me",
55 "seed.bitcoin.sipa.be",
56 "dnsseed.bitcoin.dashjr.org",
57 };
58
59 void ThreadDNSAddressSeed(void* parg)
60 {
61 IMPLEMENT_RANDOMIZE_STACK(ThreadDNSAddressSeed(parg));
62 try
63 {
64 vnThreadsRunning[6]++;
65 ThreadDNSAddressSeed2(parg);
66 vnThreadsRunning[6]--;
67 }
68 catch (std::exception& e) {
69 vnThreadsRunning[6]--;
70 PrintException(&e, "ThreadDNSAddressSeed()");
71 } catch (...) {
72 vnThreadsRunning[6]--;
73 throw; // support pthread_cancel()
74 }
75 printf("ThreadDNSAddressSeed exiting\n");
76 }
77
78 void ThreadDNSAddressSeed2(void* parg)
79 {
80 printf("ThreadDNSAddressSeed started\n");
81 int found = 0;
82
83 if (!fTestNet)
84 {
85 printf("Loading addresses from DNS seeds (could take a while)\n");
86
87 for (int seed_idx = 0; seed_idx < ARRAYLEN(strDNSSeed); seed_idx++) {
88 vector<CAddress> vaddr;
89 if (Lookup(strDNSSeed[seed_idx], vaddr, NODE_NETWORK, -1, true))
90 {
91 CAddrDB addrDB;
92 addrDB.TxnBegin();
93 BOOST_FOREACH (CAddress& addr, vaddr)
94 {
95 if (addr.GetByte(3) != 127)
96 {
97 addr.nTime = 0;
98 AddAddress(addr, 0, &addrDB);
99 found++;
100 }
101 }
102 addrDB.TxnCommit(); // Save addresses (it's ok if this fails)
103 }
104 }
105 }
106
107 printf("%d addresses found from DNS seeds\n", found);
108 }
109
110
111
112
113
114
115
116
117
118
119
120
121 unsigned int pnSeed[] =
122 {
123 0x959bd347, 0xf8de42b2, 0x73bc0518, 0xea6edc50, 0x21b00a4d, 0xc725b43d, 0xd665464d, 0x1a2a770e,
(1649 . 12)(1562 . 6)
125 // Start threads
126 //
127
128 if (GetBoolArg("-nodnsseed"))
129 printf("DNS seeding disabled\n");
130 else
131 if (!CreateThread(ThreadDNSAddressSeed, NULL))
132 printf("Error: CreateThread(ThreadDNSAddressSeed) failed\n");
133
134 // Get addresses from IRC and advertise ours
135 if (!CreateThread(ThreadIRCSeed, NULL))
136 printf("Error: CreateThread(ThreadIRCSeed) failed\n");
(1693 . 7)(1600 . 6)
138 if (vnThreadsRunning[2] > 0) printf("ThreadMessageHandler still running\n");
139 if (vnThreadsRunning[3] > 0) printf("ThreadBitcoinMiner still running\n");
140 if (vnThreadsRunning[4] > 0) printf("ThreadRPCServer still running\n");
141 if (vnThreadsRunning[6] > 0) printf("ThreadDNSAddressSeed still running\n");
142 while (vnThreadsRunning[2] > 0 || vnThreadsRunning[4] > 0)
143 Sleep(20);
144 Sleep(50);