aboutsummaryrefslogtreecommitdiff
path: root/src/walletdb.cpp
diff options
context:
space:
mode:
authorPhilip Kaufmann <phil.kaufmann@t-online.de>2013-11-15 12:24:34 +0100
committerPhilip Kaufmann <phil.kaufmann@t-online.de>2013-11-15 12:24:34 +0100
commitfabba0e6cc08af2b6ff651c5f16b55ffbee9c45b (patch)
tree3a3e28d39da41d9a4336dda61dc0ebf287eb3e74 /src/walletdb.cpp
parent4fc241235c41fbf7f2592dfee11db5b7b71c17ad (diff)
downloadbitcoin-fabba0e6cc08af2b6ff651c5f16b55ffbee9c45b.tar.xz
orphan spaces cleanup ;-)
Diffstat (limited to 'src/walletdb.cpp')
-rw-r--r--src/walletdb.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/walletdb.cpp b/src/walletdb.cpp
index 8317862f7c..6b3628b184 100644
--- a/src/walletdb.cpp
+++ b/src/walletdb.cpp
@@ -82,8 +82,8 @@ bool CWalletDB::WriteKey(const CPubKey& vchPubKey, const CPrivKey& vchPrivKey, c
return Write(std::make_pair(std::string("key"), vchPubKey), std::make_pair(vchPrivKey, Hash(vchKey.begin(), vchKey.end())), false);
}
-bool CWalletDB::WriteCryptedKey(const CPubKey& vchPubKey,
- const std::vector<unsigned char>& vchCryptedSecret,
+bool CWalletDB::WriteCryptedKey(const CPubKey& vchPubKey,
+ const std::vector<unsigned char>& vchCryptedSecret,
const CKeyMetadata &keyMeta)
{
const bool fEraseUnencryptedKey = true;
@@ -429,7 +429,7 @@ ReadKeyValue(CWallet* pwallet, CDataStream& ssKey, CDataStream& ssValue,
CKey key;
CPrivKey pkey;
uint256 hash = 0;
-
+
if (strType == "key")
{
wss.nKeys++;
@@ -439,7 +439,7 @@ ReadKeyValue(CWallet* pwallet, CDataStream& ssKey, CDataStream& ssValue,
ssValue >> wkey;
pkey = wkey.vchPrivKey;
}
-
+
// Old wallets store keys as "key" [pubkey] => [privkey]
// ... which was slow for wallets with lots of keys, because the public key is re-derived from the private key
// using EC operations as a checksum.
@@ -450,9 +450,9 @@ ReadKeyValue(CWallet* pwallet, CDataStream& ssKey, CDataStream& ssValue,
ssValue >> hash;
}
catch(...){}
-
+
bool fSkipCheck = false;
-
+
if (hash != 0)
{
// hash pubkey/privkey to accelerate wallet load
@@ -460,16 +460,16 @@ ReadKeyValue(CWallet* pwallet, CDataStream& ssKey, CDataStream& ssValue,
vchKey.reserve(vchPubKey.size() + pkey.size());
vchKey.insert(vchKey.end(), vchPubKey.begin(), vchPubKey.end());
vchKey.insert(vchKey.end(), pkey.begin(), pkey.end());
-
+
if (Hash(vchKey.begin(), vchKey.end()) != hash)
{
strErr = "Error reading wallet database: CPubKey/CPrivKey corrupt";
return false;
}
-
+
fSkipCheck = true;
}
-
+
if (!key.Load(pkey, vchPubKey, fSkipCheck))
{
strErr = "Error reading wallet database: CPrivKey corrupt";