#include <boost/filesystem.hpp>
#include <boost/filesystem/fstream.hpp>
+#include "main.h"
using namespace std;
using namespace boost;
-//
-// Global state
-//
+
CCriticalSection cs_setpwalletRegistered;
set<CWallet*> setpwalletRegistered;
unsigned int nModifierInterval = 6 * 60 * 60; // time to elapse before new modifier is computed
int nCoinbaseMaturity = 500;
+
CBlockIndex* pindexGenesisBlock = NULL;
int nBestHeight = -1;
bool LoadBlockIndex(bool fAllowNew)
{
+ if (fTestNet)
+ {
+ pchMessageStart[0] = 0xcd;
+ pchMessageStart[1] = 0xf2;
+ pchMessageStart[2] = 0xc0;
+ pchMessageStart[3] = 0xef;
+
+ bnProofOfWorkLimit = bnProofOfWorkLimitTestNet; // 16 bits PoW target limit for testnet
+ nStakeMinAge = 2 * 60 * 60; // test net min age is 2 hours
+ nModifierInterval = 20 * 60; // test modifier interval is 20 minutes
+ nCoinbaseMaturity = 10; // test maturity is 10 blocks
+ nStakeTargetSpacing = 5 * 60; // test block spacing is 5 minutes
+ }
+
//
// Load block index
//
}
catch (std::exception &e) {
printf("%s() : Deserialize or I/O error caught during load\n",
- __PRETTY_FUNCTION__);
+ BOOST_CURRENT_FUNCTION);
}
}
printf("Loaded %i blocks from external file in %"PRI64d"ms\n", nLoaded, GetTimeMillis() - nStart);