diff options
author | s_nakamoto <s_nakamoto@1a98c847-1fd6-4fd8-948a-caf3550aa51b> | 2010-02-03 22:58:40 +0000 |
---|---|---|
committer | s_nakamoto <s_nakamoto@1a98c847-1fd6-4fd8-948a-caf3550aa51b> | 2010-02-03 22:58:40 +0000 |
commit | 2939cab06d65548abdaeb1ff218550eb47b93362 (patch) | |
tree | 3220aa303c10ebbcef8520e38a1010f6a7972586 /db.cpp | |
parent | 9e56521b4b79a90cfae63c658ed2ecb67acebfca (diff) | |
download | bitcoin-2939cab06d65548abdaeb1ff218550eb47b93362.tar.xz |
update fSpent flag on wallet transactions if they're seen spent in case copy of wallet.dat was used elsewhere or restored from backup,
better error dialog box if try to spend already spent coins,
got rid of unused notebook with only one tab on main dialog,
nicer looking About dialog,
resize About dialog better on linux
Diffstat (limited to 'db.cpp')
-rw-r--r-- | db.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
@@ -1,4 +1,4 @@ -// Copyright (c) 2009 Satoshi Nakamoto
+// Copyright (c) 2009-2010 Satoshi Nakamoto
// Distributed under the MIT/X11 software license, see the accompanying
// file license.txt or http://www.opensource.org/licenses/mit-license.php.
@@ -593,14 +593,17 @@ bool CWalletDB::LoadWallet(vector<unsigned char>& vchDefaultKeyRet) // wtx.hashBlock.ToString().substr(0,16).c_str(),
// wtx.mapValue["message"].c_str());
}
- else if (strType == "key")
+ else if (strType == "key" || strType == "wkey")
{
vector<unsigned char> vchPubKey;
ssKey >> vchPubKey;
- CPrivKey vchPrivKey;
- ssValue >> vchPrivKey;
+ CWalletKey wkey;
+ if (strType == "key")
+ ssValue >> wkey.vchPrivKey;
+ else
+ ssValue >> wkey;
- mapKeys[vchPubKey] = vchPrivKey;
+ mapKeys[vchPubKey] = wkey.vchPrivKey;
mapPubKeys[Hash160(vchPubKey)] = vchPubKey;
}
else if (strType == "defaultkey")
|