diff options
author | Jorge Timón <jtimon@jtimon.cc> | 2015-04-03 17:42:06 +0200 |
---|---|---|
committer | Jorge Timón <jtimon@jtimon.cc> | 2015-04-04 12:58:14 +0200 |
commit | f14e687feb554e64bf38715c001da0c0954be694 (patch) | |
tree | 390dd0216e1b94411e36a80f94864f9d160a00fe /src/alert.cpp | |
parent | 2dc679d22f821d26a9f8a7eef6d095ef21d1b27c (diff) |
Chainparams: Decouple CAlert from CChainParams
Diffstat (limited to 'src/alert.cpp')
-rw-r--r-- | src/alert.cpp | 9 |
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; |