aboutsummaryrefslogtreecommitdiff
path: root/src/wallet.cpp
diff options
context:
space:
mode:
authorPieter Wuille <pieter.wuille@gmail.com>2013-10-19 18:34:06 +0200
committerPieter Wuille <pieter.wuille@gmail.com>2013-10-26 14:51:46 +0200
commit00588c3fac4822d42ffde46ca55c029a74c378ee (patch)
tree9e3d048531cae00793f32b9e4a05116986cc1f58 /src/wallet.cpp
parente010af7089b18af838b74a4dc7908885c1600d13 (diff)
downloadbitcoin-00588c3fac4822d42ffde46ca55c029a74c378ee.tar.xz
Use boost signals for callbacks from main to wallet
Diffstat (limited to 'src/wallet.cpp')
-rw-r--r--src/wallet.cpp20
1 files changed, 8 insertions, 12 deletions
diff --git a/src/wallet.cpp b/src/wallet.cpp
index 24813c54ec..bd9e2c7347 100644
--- a/src/wallet.cpp
+++ b/src/wallet.cpp
@@ -505,7 +505,7 @@ bool CWallet::AddToWallet(const CWalletTx& wtxIn)
// Add a transaction to the wallet, or update it.
// pblock is optional, but should be provided if the transaction is known to be in a block.
// If fUpdate is true, existing transactions will be updated.
-bool CWallet::AddToWalletIfInvolvingMe(const uint256 &hash, const CTransaction& tx, const CBlock* pblock, bool fUpdate, bool fFindBlock)
+bool CWallet::AddToWalletIfInvolvingMe(const uint256 &hash, const CTransaction& tx, const CBlock* pblock, bool fUpdate)
{
{
LOCK(cs_wallet);
@@ -525,16 +525,20 @@ bool CWallet::AddToWalletIfInvolvingMe(const uint256 &hash, const CTransaction&
return false;
}
-bool CWallet::EraseFromWallet(uint256 hash)
+void CWallet::SyncTransaction(const uint256 &hash, const CTransaction& tx, const CBlock* pblock) {
+ AddToWalletIfInvolvingMe(hash, tx, pblock, true);
+}
+
+void CWallet::EraseFromWallet(const uint256 &hash)
{
if (!fFileBacked)
- return false;
+ return;
{
LOCK(cs_wallet);
if (mapWallet.erase(hash))
CWalletDB(strWalletFile).EraseTx(hash);
}
- return true;
+ return;
}
@@ -1496,14 +1500,6 @@ bool CWallet::SetDefaultKey(const CPubKey &vchPubKey)
return true;
}
-bool GetWalletFile(CWallet* pwallet, string &strWalletFileOut)
-{
- if (!pwallet->fFileBacked)
- return false;
- strWalletFileOut = pwallet->strWalletFile;
- return true;
-}
-
//
// Mark old keypool keys as used,
// and generate all new keys