Merge branch '0.6.x' of git://gitorious.org/+bitcoin-stable-developers/bitcoin/bitcoi...
[novacoin.git] / src / key.cpp
index ece835d..18b4672 100644 (file)
@@ -1,11 +1,14 @@
 // Copyright (c) 2009-2012 The Bitcoin developers
 // Distributed under the MIT/X11 software license, see the accompanying
-// file license.txt or http://www.opensource.org/licenses/mit-license.php.
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+#include <map>
 
 #include <openssl/ecdsa.h>
 #include <openssl/obj_mac.h>
 
 #include "key.h"
+#include "util.h"
 
 // Generate a private key from just the secret parameter
 int EC_KEY_regenerate_key(EC_KEY *eckey, BIGNUM *priv_key)
@@ -352,6 +355,7 @@ bool CKey::Verify(uint256 hash, const std::vector<unsigned char>& vchSig)
     // -1 = error, 0 = bad sig, 1 = good
     if (ECDSA_verify(0, (unsigned char*)&hash, sizeof(hash), &vchSig[0], vchSig.size(), pkey) != 1)
         return false;
+
     return true;
 }
 
@@ -362,6 +366,7 @@ bool CKey::VerifyCompact(uint256 hash, const std::vector<unsigned char>& vchSig)
         return false;
     if (GetPubKey() != key.GetPubKey())
         return false;
+
     return true;
 }