mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-19 23:03:45 +01:00
Use boost signals for callbacks from main to wallet
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user