Fix wallet encryption with compressed pubkeys
authorPieter Wuille <pieter.wuille@gmail.com>
Sat, 11 Feb 2012 15:35:13 +0000 (16:35 +0100)
committerPieter Wuille <pieter.wuille@gmail.com>
Sat, 11 Feb 2012 15:42:44 +0000 (16:42 +0100)
src/keystore.cpp

index 4a59010..18e5c37 100644 (file)
@@ -192,7 +192,7 @@ bool CCryptoKeyStore::EncryptKeys(CKeyingMaterial& vMasterKeyIn)
         BOOST_FOREACH(KeyMap::value_type& mKey, mapKeys)
         {
             CKey key;
-            if (!key.SetSecret(mKey.second.first, false))
+            if (!key.SetSecret(mKey.second.first, mKey.second.second))
                 return false;
             const std::vector<unsigned char> vchPubKey = key.GetPubKey();
             std::vector<unsigned char> vchCryptedSecret;