- 18A4B9A7ABCCAC46895C8EEB0C14CC502F3743958654444C87D5192A51073980858750DAA9C8BD67F4D4D2EC8A7117AEA8FC75A4ACF73CC1A2CAB996AEA324B1
+ F55521AE4E41E386B5A5B839C778B27317EB67B98D8FC502ADBF46F8D2E68236D03D48C9509DE6B90EF64ECB976CBAB4BC24BFD114962C75DB927D369C9122D6
bitcoin/src/main.cpp
(311 . 8)(311 . 8)
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());