aboutsummaryrefslogtreecommitdiff
path: root/src/walletdb.cpp
diff options
context:
space:
mode:
authorCozz Lovan <cozzlovan@yahoo.com>2014-02-14 18:27:15 +0100
committerCozz Lovan <cozzlovan@yahoo.com>2014-06-16 18:56:57 +0200
commit77cbd4623e171ee9c48ada8a421295ed2c8e6c7c (patch)
tree84ff89231b49da39f3ff6d4d8baeded4a3e8c068 /src/walletdb.cpp
parent529047fcd18acd1b64dc95d6eb69edeaad75d405 (diff)
Let -zapwallettxes recover transaction meta data
Diffstat (limited to 'src/walletdb.cpp')
-rw-r--r--src/walletdb.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/walletdb.cpp b/src/walletdb.cpp
index 80e9dded5f..3ce2ef019c 100644
--- a/src/walletdb.cpp
+++ b/src/walletdb.cpp
@@ -680,7 +680,7 @@ DBErrors CWalletDB::LoadWallet(CWallet* pwallet)
return result;
}
-DBErrors CWalletDB::FindWalletTx(CWallet* pwallet, vector<uint256>& vTxHash)
+DBErrors CWalletDB::FindWalletTx(CWallet* pwallet, vector<uint256>& vTxHash, vector<CWalletTx>& vWtx)
{
pwallet->vchDefaultKey = CPubKey();
CWalletScanState wss;
@@ -725,7 +725,11 @@ DBErrors CWalletDB::FindWalletTx(CWallet* pwallet, vector<uint256>& vTxHash)
uint256 hash;
ssKey >> hash;
+ CWalletTx wtx;
+ ssValue >> wtx;
+
vTxHash.push_back(hash);
+ vWtx.push_back(wtx);
}
}
pcursor->close();
@@ -743,11 +747,11 @@ DBErrors CWalletDB::FindWalletTx(CWallet* pwallet, vector<uint256>& vTxHash)
return result;
}
-DBErrors CWalletDB::ZapWalletTx(CWallet* pwallet)
+DBErrors CWalletDB::ZapWalletTx(CWallet* pwallet, vector<CWalletTx>& vWtx)
{
// build list of wallet TXs
vector<uint256> vTxHash;
- DBErrors err = FindWalletTx(pwallet, vTxHash);
+ DBErrors err = FindWalletTx(pwallet, vTxHash, vWtx);
if (err != DB_LOAD_OK)
return err;