diff options
| author | Mike Hearn <[email protected]> | 2013-05-07 15:16:25 +0200 |
|---|---|---|
| committer | Mike Hearn <[email protected]> | 2013-06-19 16:28:52 +0200 |
| commit | 0e4b31755534fac4ea6c20a60f719e3694252220 (patch) | |
| tree | 80f576f67c855485e5d82007b98a45536bbf2f9a /src/alert.cpp | |
| parent | Move implementation of some CBlockLocator methods (diff) | |
| download | discoin-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/alert.cpp')
| -rw-r--r-- | src/alert.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/alert.cpp b/src/alert.cpp index 44f4d5eec..e00847aad 100644 --- a/src/alert.cpp +++ b/src/alert.cpp @@ -19,9 +19,6 @@ using namespace std; map<uint256, CAlert> mapAlerts; CCriticalSection cs_mapAlerts; -static const char* pszMainKey = "04fc9702847840aaf195de8442ebecedf5b095cdbb9bc716bda9110971b28a49e0ead8564ff0db22209e0374782c093bb899692d524e9d6a6956e7c5ecbcd68284"; -static const char* pszTestKey = "04302390343f91cc401d56d68b123028bf52e5fca1939df127f63c6467cdf9c8e2c14b61104cf817d0b780da337893ecc4aaff1309e536162dabbdb45200ca2b0a"; - void CUnsignedAlert::SetNull() { nVersion = 1; @@ -144,7 +141,7 @@ bool CAlert::RelayTo(CNode* pnode) const bool CAlert::CheckSignature() const { - CPubKey key(ParseHex(fTestNet ? pszTestKey : pszMainKey)); + CPubKey key(Params().AlertKey()); if (!key.Verify(Hash(vchMsg.begin(), vchMsg.end()), vchSig)) return error("CAlert::CheckSignature() : verify signature failed"); |