aboutsummaryrefslogtreecommitdiff
path: root/src/rpcmining.cpp
diff options
context:
space:
mode:
authorMike Hearn <[email protected]>2013-05-07 15:16:25 +0200
committerMike Hearn <[email protected]>2013-06-19 16:28:52 +0200
commit0e4b31755534fac4ea6c20a60f719e3694252220 (patch)
tree80f576f67c855485e5d82007b98a45536bbf2f9a /src/rpcmining.cpp
parentMove implementation of some CBlockLocator methods (diff)
downloaddiscoin-0e4b31755534fac4ea6c20a60f719e3694252220.tar.xz
discoin-0e4b31755534fac4ea6c20a60f719e3694252220.zip
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.
Diffstat (limited to 'src/rpcmining.cpp')
-rw-r--r--src/rpcmining.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/rpcmining.cpp b/src/rpcmining.cpp
index 6f8ac7a11..d0b0a70be 100644
--- a/src/rpcmining.cpp
+++ b/src/rpcmining.cpp
@@ -3,6 +3,7 @@
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+#include "chainparams.h"
#include "main.h"
#include "db.h"
#include "init.h"
@@ -93,7 +94,7 @@ Value getmininginfo(const Array& params, bool fHelp)
obj.push_back(Pair("genproclimit", (int)GetArg("-genproclimit", -1)));
obj.push_back(Pair("hashespersec", gethashespersec(params, false)));
obj.push_back(Pair("pooledtx", (uint64_t)mempool.size()));
- obj.push_back(Pair("testnet", fTestNet));
+ obj.push_back(Pair("testnet", TestNet()));
return obj;
}