tree checksum vpatch file split hunks
all signers: mod6
antecedents: asciilifeform_dns_thermonyukyoolar_kleansing asciilifeform_tx-orphanage_amputation asciilifeform_and_now_we_have_eatblock genesis
press order:
patch:
(252 . 14)(252 . 14)- E3D08B1607A11BE7B3ABD68BDBD93CAA378C614C8855EE21BC6E1D8537E443C6F1D496BB9C86F240231065AD226A09F7F8288BB79923075492A2166A87F6DDCB
5 };
6
7 // base58-encoded bitcoin addresses
8 // Addresses have version 0 or 111 (testnet)
9 // Addresses have version 0
10 // The data vector contains RIPEMD160(SHA256(pubkey)), where pubkey is the serialized public key
11 class CBitcoinAddress : public CBase58Data
12 {
13 public:
14 bool SetHash160(const uint160& hash160)
15 {
16 SetData(fTestNet ? 111 : 0, &hash160, 20);
17 SetData(0, &hash160, 20);
18 return true;
19 }
20
(271 . 20)(271 . 15)
22 bool IsValid() const
23 {
24 int nExpectedSize = 20;
25 bool fExpectTestNet = false;
26 switch(nVersion)
27 {
28 case 0:
29 break;
30
31 case 111:
32 fExpectTestNet = true;
33 break;
34
35 default:
36 return false;
37 }
38 return fExpectTestNet == fTestNet && vchData.size() == nExpectedSize;
39 return vchData.size() == nExpectedSize;
40 }
41
42 CBitcoinAddress()
(303 . 7)(303 . 6)
47 obj.push_back(Pair("genproclimit", (int)(fLimitProcessors ? nLimitProcessors : -1)));
48 obj.push_back(Pair("difficulty", (double)GetDifficulty()));
49 obj.push_back(Pair("hashespersec", gethashespersec(params, false)));
50 obj.push_back(Pair("testnet", fTestNet));
51 obj.push_back(Pair("keypoololdest", (boost::int64_t)pwalletMain->GetOldestKeyPoolTime()));
52 obj.push_back(Pair("keypoolsize", pwalletMain->GetKeyPoolSize()));
53 obj.push_back(Pair("paytxfee", ValueFromAmount(nTransactionFee)));
- 423FE692637903B32D0DAEA46D9752322A7615CE3CD3CC3CE1F6FB2BF80B8F3C5285DB91F0BE83C5AB97C951BE6A8E46BB2B1A8FA7BDCE9780FCB6E5C54E2648(35 . 8)(35 . 6)- C51B1B2A979B2DC9E720238808EE63D62037918CAFE23CACF018BB1F53CD5BF0706CEAB4E73B41AC0B6AEAEB03C38EF7F12399225DB8E01F9595AEDEEE825421
58
59 bool CheckBlock(int nHeight, const uint256& hash)
60 {
61 if (fTestNet) return true; // Testnet has no checkpoints
62
63 MapCheckpoints::const_iterator i = mapCheckpoints.find(nHeight);
64 if (i == mapCheckpoints.end()) return true;
65 return hash == i->second;
(44 . 15)(42 . 11)
67
68 int GetTotalBlocksEstimate()
69 {
70 if (fTestNet) return 0;
71
72 return mapCheckpoints.rbegin()->first;
73 }
74
75 CBlockIndex* GetLastCheckpoint(const std::map<uint256, CBlockIndex*>& mapBlockIndex)
76 {
77 if (fTestNet) return NULL;
78
79 BOOST_REVERSE_FOREACH(const MapCheckpoints::value_type& i, mapCheckpoints)
80 {
81 const uint256& hash = i.second;
(160 . 7)(160 . 7)- 537A12D62802FA25331CE5E27434A9AF18F263BBCC4D9CB4092E8C72C314B7A1CE6ACB20CFDC3CE17A7668302F466BC5041D7E5A40F7C4531C411A40C86FF767
86 " -datadir=<dir> \t\t " + _("Specify data directory\n") +
87 " -timeout=<n> \t " + _("Specify connection timeout (in milliseconds)\n") +
88 " -proxy=<ip:port> \t " + _("Connect through socks4 proxy\n") +
89 " -port=<port> \t\t " + _("Listen for connections on <port> (default: 8333 or testnet: 18333)\n") +
90 " -port=<port> \t\t " + _("Listen for connections on <port> (default: 8333)\n") +
91 " -maxconnections=<n>\t " + _("Maintain at most <n> connections to peers (default: 125)\n") +
92 " -myip=<ip> \t " + _("Set this node's external IP address.\n") +
93 " -addnode=<ip> \t " + _("Add a node to connect to\n") +
(172 . 7)(172 . 6)
95 " -maxsendbuffer=<n>\t " + _("Maximum per-connection send buffer, <n>*1000 bytes (default: 10000)\n") +
96 " -paytxfee=<amt> \t " + _("Fee per kB to add to transactions you send\n") +
97 " -daemon \t\t " + _("Run in the background as a daemon and accept commands\n") +
98 " -testnet \t\t " + _("Use the test network\n") +
99 " -debug \t\t " + _("Output extra debugging information\n") +
100 " -caneat \t\t " + _("Permit the use of 'eatblock'\n") +
101 " -logtimestamps \t " + _("Prepend debug output with timestamp\n") +
(194 . 7)(193 . 6)
103 return false;
104 }
105
106 fTestNet = GetBoolArg("-testnet");
107 fDebug = GetBoolArg("-debug");
108 fDaemon = GetBoolArg("-daemon");
109 fCanEat = GetBoolArg("-caneat");
(311 . 8)(311 . 8)- EA4FDF494F219F2F3F9215D5DC384554B5DFF4F18001CF08EAA39322FAD2E5C1D1B74FD2486EA05D40627974DF43BAFA05D16858C1D98FBD287CB4104006662F
114 if (GetSigOpCount() > nSize / 34 || nSize < 100)
115 return error("AcceptToMemoryPool() : transaction with out-of-bounds SigOpCount");
116
117 // Rather not work on nonstandard transactions (unless -testnet)
118 if (!fTestNet && !IsStandard())
119 // Rather not work on nonstandard transactions
120 if (!IsStandard())
121 return error("AcceptToMemoryPool() : nonstandard transaction type");
122
123 // Do we already have it?
(600 . 11)(600 . 6)
125 //
126 unsigned int ComputeMinWork(unsigned int nBase, int64 nTime)
127 {
128 // Testnet has min-difficulty blocks
129 // after nTargetSpacing*2 time between blocks:
130 if (fTestNet && nTime > nTargetSpacing*2)
131 return bnProofOfWorkLimit.GetCompact();
132
133 CBigNum bnResult;
134 bnResult.SetCompact(nBase);
135 while (nTime > 0 && bnResult < bnProofOfWorkLimit)
(630 . 23)(625 . 6)
137 // Only change once per interval
138 if ((pindexLast->nHeight+1) % nInterval != 0)
139 {
140 // Special rules for testnet after 15 Feb 2012:
141 if (fTestNet && pblock->nTime > 1329264000)
142 {
143 // If the new block's timestamp is more than 2* 10 minutes
144 // then allow mining of a min-difficulty block.
145 if (pblock->nTime - pindexLast->nTime > nTargetSpacing*2)
146 return nProofOfWorkLimit;
147 else
148 {
149 // Return the last non-special-min-difficulty-rules-block
150 const CBlockIndex* pindex = pindexLast;
151 while (pindex->pprev && pindex->nHeight % nInterval != 0 && pindex->nBits == nProofOfWorkLimit)
152 pindex = pindex->pprev;
153 return pindex->nBits;
154 }
155 }
156
157 return pindexLast->nBits;
158 }
159
(992 . 8)(970 . 7)
161 // This logic is not necessary for memory pool transactions, as AcceptToMemoryPool
162 // already refuses previously-known transaction id's entirely.
163 // This rule applies to all blocks whose timestamp is after March 15, 2012, 0:00 UTC.
164 // On testnet it is enabled as of februari 20, 2012, 0:00 UTC.
165 if (pindex->nTime > 1331769600 || (fTestNet && pindex->nTime > 1329696000))
166 if (pindex->nTime > 1331769600)
167 BOOST_FOREACH(CTransaction& tx, vtx)
168 {
169 CTxIndex txindexOld;
(1461 . 16)(1438 . 6)
171
172 bool LoadBlockIndex(bool fAllowNew)
173 {
174 if (fTestNet)
175 {
176 hashGenesisBlock = uint256("0x00000007199508e34a9ff81e6ec0c477a4cccff2a4767a8eee39c11db367b008");
177 bnProofOfWorkLimit = CBigNum(~uint256(0) >> 28);
178 pchMessageStart[0] = 0xfa;
179 pchMessageStart[1] = 0xbf;
180 pchMessageStart[2] = 0xb5;
181 pchMessageStart[3] = 0xda;
182 }
183
184 //
185 // Load block index
186 //
(1511 . 13)(1478 . 6)
188 block.nBits = 0x1d00ffff;
189 block.nNonce = 2083236893;
190
191 if (fTestNet)
192 {
193 block.nTime = 1296688602;
194 block.nBits = 0x1d07fff8;
195 block.nNonce = 384568319;
196 }
197
198 //// debug print
199 printf("%s\n", block.GetHash().ToString().c_str());
200 printf("%s\n", hashGenesisBlock.ToString().c_str());
(14 . 10)(14 . 9)
205 #include <string>
206 #include "uint256.h"
207
208 extern bool fTestNet;
209 static inline unsigned short GetDefaultPort(const bool testnet = fTestNet)
210 static inline unsigned short GetDefaultPort()
211 {
212 return testnet ? 18333 : 8333;
213 return 8333;
214 }
215
216 //
- 813C57D2D79F725CCFE04AF8D7CEE5DFC73C9ABA6B3C958334CFC678AACBEEF96E9DCF37F78B596B7EB5D7B70E6F7FC3BCBF9C1EBBD2846E35CDB61786E4F801(28 . 7)(28 . 6)- A3BBBD780CE698A1EC2FE7758063C42836B13A2785044250B504C520B64C07CD9F1BE985437A61CD3E72C655A063F21BBB336DD51204C88DC126031DC5AC4093
221 bool fServer = false;
222 bool fCommandLine = false;
223 string strMiscWarning;
224 bool fTestNet = false;
225 bool fNoListen = false;
226 bool fLogTimestamps = false;
227
(685 . 14)(684 . 6)
229 strlcpy(pszDir, pszCachedDir, MAX_PATH);
230 nVariation = 1;
231 }
232 if (fTestNet)
233 {
234 char* p = pszDir + strlen(pszDir);
235 if (p > pszDir && p[-1] != '/' && p[-1] != '\\')
236 *p++ = '/';
237 strcpy(p, "testnet");
238 nVariation += 2;
239 }
240 static bool pfMkdir[4];
241 if (!pfMkdir[nVariation])
242 {
(118 . 7)(118 . 6)
247 extern bool fServer;
248 extern bool fCommandLine;
249 extern std::string strMiscWarning;
250 extern bool fTestNet;
251 extern bool fNoListen;
252 extern bool fLogTimestamps;
253