diff options
Diffstat (limited to 'src/alert.cpp')
-rw-r--r-- | src/alert.cpp | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/src/alert.cpp b/src/alert.cpp index 44f4d5eec6..c9cde17955 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; @@ -79,7 +76,7 @@ std::string CUnsignedAlert::ToString() const void CUnsignedAlert::print() const { - printf("%s", ToString().c_str()); + LogPrintf("%s", ToString().c_str()); } void CAlert::SetNull() @@ -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"); @@ -203,13 +200,13 @@ bool CAlert::ProcessAlert(bool fThread) const CAlert& alert = (*mi).second; if (Cancels(alert)) { - printf("cancelling alert %d\n", alert.nID); + LogPrint("alert", "cancelling alert %d\n", alert.nID); uiInterface.NotifyAlertChanged((*mi).first, CT_DELETED); mapAlerts.erase(mi++); } else if (!alert.IsInEffect()) { - printf("expiring alert %d\n", alert.nID); + LogPrint("alert", "expiring alert %d\n", alert.nID); uiInterface.NotifyAlertChanged((*mi).first, CT_DELETED); mapAlerts.erase(mi++); } @@ -223,7 +220,7 @@ bool CAlert::ProcessAlert(bool fThread) const CAlert& alert = item.second; if (alert.Cancels(*this)) { - printf("alert already cancelled by %d\n", alert.nID); + LogPrint("alert", "alert already cancelled by %d\n", alert.nID); return false; } } @@ -261,6 +258,6 @@ bool CAlert::ProcessAlert(bool fThread) } } - printf("accepted alert %d, AppliesToMe()=%d\n", nID, AppliesToMe()); + LogPrint("alert", "accepted alert %d, AppliesToMe()=%d\n", nID, AppliesToMe()); return true; } |