aboutsummaryrefslogtreecommitdiff
path: root/src/alert.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/alert.cpp')
-rw-r--r--src/alert.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/alert.cpp b/src/alert.cpp
index 323939913b..aa7ac748da 100644
--- a/src/alert.cpp
+++ b/src/alert.cpp
@@ -5,7 +5,6 @@
#include "alert.h"
-#include "chainparams.h"
#include "clientversion.h"
#include "net.h"
#include "pubkey.h"
@@ -145,9 +144,9 @@ bool CAlert::RelayTo(CNode* pnode) const
return false;
}
-bool CAlert::CheckSignature() const
+bool CAlert::CheckSignature(const std::vector<unsigned char>& alertKey) const
{
- CPubKey key(Params().AlertKey());
+ CPubKey key(alertKey);
if (!key.Verify(Hash(vchMsg.begin(), vchMsg.end()), vchSig))
return error("CAlert::CheckSignature(): verify signature failed");
@@ -169,9 +168,9 @@ CAlert CAlert::getAlertByHash(const uint256 &hash)
return retval;
}
-bool CAlert::ProcessAlert(bool fThread)
+bool CAlert::ProcessAlert(const std::vector<unsigned char>& alertKey, bool fThread)
{
- if (!CheckSignature())
+ if (!CheckSignature(alertKey))
return false;
if (!IsInEffect())
return false;