aboutsummaryrefslogtreecommitdiff
path: root/src/alert.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <[email protected]>2015-04-08 09:40:44 +0200
committerWladimir J. van der Laan <[email protected]>2015-04-08 09:41:14 +0200
commit91cba1aaed4063bdd5d5ab3ce313a4a8bba7280c (patch)
tree5eebaa135de984bc08b7ca3e0ed5801e68ed91ae /src/alert.cpp
parentMerge pull request #5959 (diff)
parentChainparams: Decouple CAlert from CChainParams (diff)
downloaddiscoin-91cba1aaed4063bdd5d5ab3ce313a4a8bba7280c.tar.xz
discoin-91cba1aaed4063bdd5d5ab3ce313a4a8bba7280c.zip
Merge pull request #5969
f14e687 Chainparams: Decouple CAlert from CChainParams (Jorge Timón)
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 323939913..aa7ac748d 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;