--- a/trb bca49498d86eeeb3f27ccb701f01542f9d57beb817b835634a3c8adb7661202d907439ad59f62646f55c5c0017938a3b0303c43252396f92f99a34439a7c1fd3 +++ b/trb 6a90402592006d8fe36baaf750aef85fecedd1d795704850e0460d3b08813e6fe9c89a0f09b17d1c4d0b8aa051f4de44102b8c0fc830f66c30b104ce1253c9a3 @@ -6825,7 +6825,7 @@ #include "noui.h" ############################################################################## -4201 @ ./bitcoin/src/protocol.h +4132 @ ./bitcoin/src/protocol.h ############################################################################## // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2011 The Bitcoin developers @@ -6843,10 +6843,9 @@ #include #include "uint256.h" -extern bool fTestNet; -static inline unsigned short GetDefaultPort(const bool testnet = fTestNet) +static inline unsigned short GetDefaultPort() { - return testnet ? 18333 : 8333; + return 8333; } // @@ -6979,7 +6978,7 @@ #endif // __INCLUDED_PROTOCOL_H__ ############################################################################## -84930 @ ./bitcoin/src/bitcoinrpc.cpp +84878 @ ./bitcoin/src/bitcoinrpc.cpp ############################################################################## // Copyright (c) 2010 Satoshi Nakamoto // Copyright (c) 2009-2012 The Bitcoin developers @@ -7286,7 +7285,6 @@ obj.push_back(Pair("genproclimit", (int)(fLimitProcessors ? nLimitProcessors : -1))); obj.push_back(Pair("difficulty", (double)GetDifficulty())); obj.push_back(Pair("hashespersec", gethashespersec(params, false))); - obj.push_back(Pair("testnet", fTestNet)); obj.push_back(Pair("keypoololdest", (boost::int64_t)pwalletMain->GetOldestKeyPoolTime())); obj.push_back(Pair("keypoolsize", pwalletMain->GetKeyPoolSize())); obj.push_back(Pair("paytxfee", ValueFromAmount(nTransactionFee))); @@ -9484,7 +9482,7 @@ #endif ############################################################################## -99339 @ ./bitcoin/src/main.cpp +97770 @ ./bitcoin/src/main.cpp ############################################################################## // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2012 The Bitcoin developers @@ -9799,8 +9797,8 @@ if (GetSigOpCount() > nSize / 34 || nSize < 100) return error("AcceptToMemoryPool() : transaction with out-of-bounds SigOpCount"); - // Rather not work on nonstandard transactions (unless -testnet) - if (!fTestNet && !IsStandard()) + // Rather not work on nonstandard transactions + if (!IsStandard()) return error("AcceptToMemoryPool() : nonstandard transaction type"); // Do we already have it? @@ -10088,11 +10086,6 @@ // unsigned int ComputeMinWork(unsigned int nBase, int64 nTime) { - // Testnet has min-difficulty blocks - // after nTargetSpacing*2 time between blocks: - if (fTestNet && nTime > nTargetSpacing*2) - return bnProofOfWorkLimit.GetCompact(); - CBigNum bnResult; bnResult.SetCompact(nBase); while (nTime > 0 && bnResult < bnProofOfWorkLimit) @@ -10118,23 +10111,6 @@ // Only change once per interval if ((pindexLast->nHeight+1) % nInterval != 0) { - // Special rules for testnet after 15 Feb 2012: - if (fTestNet && pblock->nTime > 1329264000) - { - // If the new block's timestamp is more than 2* 10 minutes - // then allow mining of a min-difficulty block. - if (pblock->nTime - pindexLast->nTime > nTargetSpacing*2) - return nProofOfWorkLimit; - else - { - // Return the last non-special-min-difficulty-rules-block - const CBlockIndex* pindex = pindexLast; - while (pindex->pprev && pindex->nHeight % nInterval != 0 && pindex->nBits == nProofOfWorkLimit) - pindex = pindex->pprev; - return pindex->nBits; - } - } - return pindexLast->nBits; } @@ -10480,8 +10456,7 @@ // This logic is not necessary for memory pool transactions, as AcceptToMemoryPool // already refuses previously-known transaction id's entirely. // This rule applies to all blocks whose timestamp is after March 15, 2012, 0:00 UTC. - // On testnet it is enabled as of februari 20, 2012, 0:00 UTC. - if (pindex->nTime > 1331769600 || (fTestNet && pindex->nTime > 1329696000)) + if (pindex->nTime > 1331769600) BOOST_FOREACH(CTransaction& tx, vtx) { CTxIndex txindexOld; @@ -10949,16 +10924,6 @@ bool LoadBlockIndex(bool fAllowNew) { - if (fTestNet) - { - hashGenesisBlock = uint256("0x00000007199508e34a9ff81e6ec0c477a4cccff2a4767a8eee39c11db367b008"); - bnProofOfWorkLimit = CBigNum(~uint256(0) >> 28); - pchMessageStart[0] = 0xfa; - pchMessageStart[1] = 0xbf; - pchMessageStart[2] = 0xb5; - pchMessageStart[3] = 0xda; - } - // // Load block index // @@ -10999,13 +10964,6 @@ block.nBits = 0x1d00ffff; block.nNonce = 2083236893; - if (fTestNet) - { - block.nTime = 1296688602; - block.nBits = 0x1d07fff8; - block.nNonce = 384568319; - } - //// debug print printf("%s\n", block.GetHash().ToString().c_str()); printf("%s\n", hashGenesisBlock.ToString().c_str()); @@ -19531,7 +19489,7 @@ } ############################################################################## -17649 @ ./bitcoin/src/util.h +17627 @ ./bitcoin/src/util.h ############################################################################## // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2012 The Bitcoin developers @@ -19653,7 +19611,6 @@ extern bool fServer; extern bool fCommandLine; extern std::string strMiscWarning; -extern bool fTestNet; extern bool fNoListen; extern bool fLogTimestamps; @@ -20340,7 +20297,7 @@ -rm -f obj-test/*.P ############################################################################## -2604 @ ./bitcoin/src/checkpoints.cpp +2469 @ ./bitcoin/src/checkpoints.cpp ############################################################################## // Copyright (c) 2009-2012 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying @@ -20379,8 +20336,6 @@ bool CheckBlock(int nHeight, const uint256& hash) { - if (fTestNet) return true; // Testnet has no checkpoints - MapCheckpoints::const_iterator i = mapCheckpoints.find(nHeight); if (i == mapCheckpoints.end()) return true; return hash == i->second; @@ -20388,15 +20343,11 @@ int GetTotalBlocksEstimate() { - if (fTestNet) return 0; - return mapCheckpoints.rbegin()->first; } CBlockIndex* GetLastCheckpoint(const std::map& mapBlockIndex) { - if (fTestNet) return NULL; - BOOST_REVERSE_FOREACH(const MapCheckpoints::value_type& i, mapCheckpoints) { const uint256& hash = i.second; @@ -20409,7 +20360,7 @@ } ############################################################################## -15537 @ ./bitcoin/src/init.cpp +15408 @ ./bitcoin/src/init.cpp ############################################################################## // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2012 The Bitcoin developers @@ -20573,7 +20524,7 @@ " -datadir= \t\t " + _("Specify data directory\n") + " -timeout= \t " + _("Specify connection timeout (in milliseconds)\n") + " -proxy= \t " + _("Connect through socks4 proxy\n") + - " -port= \t\t " + _("Listen for connections on (default: 8333 or testnet: 18333)\n") + + " -port= \t\t " + _("Listen for connections on (default: 8333)\n") + " -maxconnections=\t " + _("Maintain at most connections to peers (default: 125)\n") + " -myip= \t " + _("Set this node's external IP address.\n") + " -addnode= \t " + _("Add a node to connect to\n") + @@ -20585,7 +20536,6 @@ " -maxsendbuffer=\t " + _("Maximum per-connection send buffer, *1000 bytes (default: 10000)\n") + " -paytxfee= \t " + _("Fee per kB to add to transactions you send\n") + " -daemon \t\t " + _("Run in the background as a daemon and accept commands\n") + - " -testnet \t\t " + _("Use the test network\n") + " -debug \t\t " + _("Output extra debugging information\n") + " -caneat \t\t " + _("Permit the use of 'eatblock'\n") + " -logtimestamps \t " + _("Prepend debug output with timestamp\n") + @@ -20607,7 +20557,6 @@ return false; } - fTestNet = GetBoolArg("-testnet"); fDebug = GetBoolArg("-debug"); fDaemon = GetBoolArg("-daemon"); fCanEat = GetBoolArg("-caneat"); @@ -22315,7 +22264,7 @@ #endif ############################################################################## -9049 @ ./bitcoin/src/base58.h +8863 @ ./bitcoin/src/base58.h ############################################################################## // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2011 The Bitcoin Developers @@ -22571,14 +22520,14 @@ }; // base58-encoded bitcoin addresses -// Addresses have version 0 or 111 (testnet) +// Addresses have version 0 // The data vector contains RIPEMD160(SHA256(pubkey)), where pubkey is the serialized public key class CBitcoinAddress : public CBase58Data { public: bool SetHash160(const uint160& hash160) { - SetData(fTestNet ? 111 : 0, &hash160, 20); + SetData(0, &hash160, 20); return true; } @@ -22590,20 +22539,15 @@ bool IsValid() const { int nExpectedSize = 20; - bool fExpectTestNet = false; switch(nVersion) { case 0: break; - case 111: - fExpectTestNet = true; - break; - default: return false; } - return fExpectTestNet == fTestNet && vchData.size() == nExpectedSize; + return vchData.size() == nExpectedSize; } CBitcoinAddress() @@ -23402,7 +23346,7 @@ #endif ############################################################################## -27833 @ ./bitcoin/src/util.cpp +27601 @ ./bitcoin/src/util.cpp ############################################################################## // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2012 The Bitcoin developers @@ -23434,7 +23378,6 @@ bool fServer = false; bool fCommandLine = false; string strMiscWarning; -bool fTestNet = false; bool fNoListen = false; bool fLogTimestamps = false; @@ -24091,14 +24034,6 @@ strlcpy(pszDir, pszCachedDir, MAX_PATH); nVariation = 1; } - if (fTestNet) - { - char* p = pszDir + strlen(pszDir); - if (p > pszDir && p[-1] != '/' && p[-1] != '\\') - *p++ = '/'; - strcpy(p, "testnet"); - nVariation += 2; - } static bool pfMkdir[4]; if (!pfMkdir[nVariation]) {