mirror of
https://github.com/kvazar-network/kevacoin.git
synced 2025-01-11 15:48:05 +00:00
Give testnet it's own alert key.
This commit is contained in:
parent
f35c6c4fb9
commit
286dbba2d2
@ -16,6 +16,9 @@ using namespace std;
|
|||||||
map<uint256, CAlert> mapAlerts;
|
map<uint256, CAlert> mapAlerts;
|
||||||
CCriticalSection cs_mapAlerts;
|
CCriticalSection cs_mapAlerts;
|
||||||
|
|
||||||
|
static const char* pszMainKey = "04fc9702847840aaf195de8442ebecedf5b095cdbb9bc716bda9110971b28a49e0ead8564ff0db22209e0374782c093bb899692d524e9d6a6956e7c5ecbcd68284";
|
||||||
|
static const char* pszTestKey = "04302390343f91cc401d56d68b123028bf52e5fca1939df127f63c6467cdf9c8e2c14b61104cf817d0b780da337893ecc4aaff1309e536162dabbdb45200ca2b0a";
|
||||||
|
|
||||||
void CUnsignedAlert::SetNull()
|
void CUnsignedAlert::SetNull()
|
||||||
{
|
{
|
||||||
nVersion = 1;
|
nVersion = 1;
|
||||||
@ -139,7 +142,7 @@ bool CAlert::RelayTo(CNode* pnode) const
|
|||||||
bool CAlert::CheckSignature() const
|
bool CAlert::CheckSignature() const
|
||||||
{
|
{
|
||||||
CKey key;
|
CKey key;
|
||||||
if (!key.SetPubKey(ParseHex("04fc9702847840aaf195de8442ebecedf5b095cdbb9bc716bda9110971b28a49e0ead8564ff0db22209e0374782c093bb899692d524e9d6a6956e7c5ecbcd68284")))
|
if (!key.SetPubKey(ParseHex(fTestNet ? pszTestKey : pszMainKey)))
|
||||||
return error("CAlert::CheckSignature() : SetPubKey failed");
|
return error("CAlert::CheckSignature() : SetPubKey failed");
|
||||||
if (!key.Verify(Hash(vchMsg.begin(), vchMsg.end()), vchSig))
|
if (!key.Verify(Hash(vchMsg.begin(), vchMsg.end()), vchSig))
|
||||||
return error("CAlert::CheckSignature() : verify signature failed");
|
return error("CAlert::CheckSignature() : verify signature failed");
|
||||||
|
Loading…
Reference in New Issue
Block a user