Introduce a CChainParameters singleton class and regtest mode.
The new class is accessed via the Params() method and holds most things that vary between main, test and regtest networks. The regtest mode has two purposes, one is to run the bitcoind/bitcoinj comparison tool which compares two separate implementations of the Bitcoin protocol looking for divergence. The other is that when run, you get a local node which can mine a single block instantly, which is highly convenient for testing apps during development as there's no need to wait 10 minutes for a block on the testnet.
This commit is contained in:
@@ -56,7 +56,7 @@ namespace Checkpoints
|
||||
60000.0 // * estimated number of transactions per day after checkpoint
|
||||
};
|
||||
|
||||
static MapCheckpoints mapCheckpointsTestnet =
|
||||
static MapCheckpoints mapCheckpointsTestnet =
|
||||
boost::assign::map_list_of
|
||||
( 546, uint256("000000002a936ca763904c3c35fce2f3556c559c0214345d31b1bcebf76acb70"))
|
||||
;
|
||||
@@ -68,7 +68,7 @@ namespace Checkpoints
|
||||
};
|
||||
|
||||
const CCheckpointData &Checkpoints() {
|
||||
if (fTestNet)
|
||||
if (TestNet())
|
||||
return dataTestnet;
|
||||
else
|
||||
return data;
|
||||
|
||||
Reference in New Issue
Block a user