diff -uNr a/bitcoin/src/base58.h b/bitcoin/src/base58.h --- a/bitcoin/src/base58.h 14321c5769eb37d637e2c911f668edbe20d8b712494ea585d8201345d690b6e82341e2f0c6c4572013ca24208e077c05f0a82a4096017083b2be9709f37498ab +++ b/bitcoin/src/base58.h e4fa4700d17d7da955e3ee980c4a4315e44655dafdec0a4657278e174fa92a187de81c121d30b85a86fd0fe4334867ca73090142c58a3d51083f4ebe7dd4b35c @@ -252,14 +252,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; } @@ -271,20 +271,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() diff -uNr a/bitcoin/src/bitcoinrpc.cpp b/bitcoin/src/bitcoinrpc.cpp --- a/bitcoin/src/bitcoinrpc.cpp 86e836b4710a5f675af7f13832f290f9b9c9f24d3efb41733d55e3a4f3f518e8c9fb1d60b43a2fba3c8327bd2b9d10e5ebbb6df8159f06873aec21d2b9123304 +++ b/bitcoin/src/bitcoinrpc.cpp ede2e19dd0ce3d03f54689cbeda30b4b36152f7e532b3d34f0f8c55bb292f7d25c149b88162d96a8208997237a32566d0e555aa7105bfed8175983d80ad892e6 @@ -303,7 +303,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))); diff -uNr a/bitcoin/src/checkpoints.cpp b/bitcoin/src/checkpoints.cpp --- a/bitcoin/src/checkpoints.cpp 0b7ca89fd0a4045ef9553ff439c4fd39dddd92069ca97b29decbc31d2f96a004e0015b453dbf4c4669555ed997ffd02f1066c43f346feb8cd0ade0b80772e863 +++ b/bitcoin/src/checkpoints.cpp 30d21253854354e384e2e900641c6fc7ca94f591487bd685f6e49310da9f63c1b201910fa8882e34c4eba2032a0b8a246d3c5617f215ddfeff3598fbd773e291 @@ -35,8 +35,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; @@ -44,15 +42,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; diff -uNr a/bitcoin/src/init.cpp b/bitcoin/src/init.cpp --- a/bitcoin/src/init.cpp c3ee100d52acbf91d3355c95edc63db6e1d8e4fb1847ebfffbb8c8fe059ea88fa2f6c9e1535526039bba6cc9b4e03b4cc5624fd28004ed7aedcf6a0f42b3e177 +++ b/bitcoin/src/init.cpp 7a171c2f30805f207ae170404f2f684144c254a13f4f25581146611c38313b2bb1b3cd6347c0ce9b66c313e0004eac66b04e83b431ec78910f5aabb0de341043 @@ -160,7 +160,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") + @@ -172,7 +172,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") + @@ -194,7 +193,6 @@ return false; } - fTestNet = GetBoolArg("-testnet"); fDebug = GetBoolArg("-debug"); fDaemon = GetBoolArg("-daemon"); fCanEat = GetBoolArg("-caneat"); diff -uNr a/bitcoin/src/main.cpp b/bitcoin/src/main.cpp --- a/bitcoin/src/main.cpp 18a4b9a7abccac46895c8eeb0c14cc502f3743958654444c87d5192a51073980858750daa9c8bd67f4d4d2ec8a7117aea8fc75a4acf73cc1a2cab996aea324b1 +++ b/bitcoin/src/main.cpp f55521ae4e41e386b5a5b839c778b27317eb67b98d8fc502adbf46f8d2e68236d03d48c9509de6b90ef64ecb976cbab4bc24bfd114962c75db927d369c9122d6 @@ -311,8 +311,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? @@ -600,11 +600,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) @@ -630,23 +625,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; } @@ -992,8 +970,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; @@ -1461,16 +1438,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 // @@ -1511,13 +1478,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()); diff -uNr a/bitcoin/src/protocol.h b/bitcoin/src/protocol.h --- a/bitcoin/src/protocol.h 788e0529775e119dbca114dd28e76b8b83ceef9870e140edd9140e8fbe61bba1213f174708a2cc8e3ceb8c839a40f8fde98a419e07c3a0fe37979e6109e4ec61 +++ b/bitcoin/src/protocol.h cce0473250e39dd85773246ea0cd40584c77daa7fcba7ff98836d8b9bdbff2f3e229f385c43c73503ca9e244219708b2299600db28d1d7df442c92f22ed74485 @@ -14,10 +14,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; } // diff -uNr a/bitcoin/src/util.cpp b/bitcoin/src/util.cpp --- a/bitcoin/src/util.cpp b801e7f75ca5c3b9463abe07201b60d4425cba761d34f70b18adcca7370f341b90b91e8cafd9fb28407439c72b4a624b10862fb22a301c9ea88f79d44267c0f7 +++ b/bitcoin/src/util.cpp e2cc1d21c90f28e0475d0801c80c81adddecf1464925c0cde2a5b004e3e26d6917d7224453fb814f62f85d566f377518501fb7e825f173c901da590491fad9c5 @@ -28,7 +28,6 @@ bool fServer = false; bool fCommandLine = false; string strMiscWarning; -bool fTestNet = false; bool fNoListen = false; bool fLogTimestamps = false; @@ -685,14 +684,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]) { diff -uNr a/bitcoin/src/util.h b/bitcoin/src/util.h --- a/bitcoin/src/util.h b81e7c3eb43eb18d226c7a0ebb5868cc793c7197318bf7954590136b9713cac00c9f44fc90578c52f86d424b272c2a78c0fc7a55b23b566cc0c859d4c699983c +++ b/bitcoin/src/util.h d88425cb5b70d7df2a60d174f99347b3ac00f0a7f17227bd9944f22ffaa3772389989c00c14135fbbb121fe3cb5b68c51eb1120ce214d3732b354c580d1f2fec @@ -118,7 +118,6 @@ extern bool fServer; extern bool fCommandLine; extern std::string strMiscWarning; -extern bool fTestNet; extern bool fNoListen; extern bool fLogTimestamps;