|
|
|
@ -637,7 +637,7 @@ bool CWallet::AddToWalletIfInvolvingMe(const CTransaction& tx, const CBlock* pbl
|
|
|
|
|
{
|
|
|
|
|
{
|
|
|
|
|
AssertLockHeld(cs_wallet);
|
|
|
|
|
bool fExisted = mapWallet.count(tx.GetHash());
|
|
|
|
|
bool fExisted = mapWallet.count(tx.GetHash()) != 0;
|
|
|
|
|
if (fExisted && !fUpdate) return false;
|
|
|
|
|
if (fExisted || IsMine(tx) || IsFromMe(tx))
|
|
|
|
|
{
|
|
|
|
@ -1129,7 +1129,7 @@ void CWallet::AvailableCoins(vector<COutput>& vCoins, bool fOnlyConfirmed, const
|
|
|
|
|
if (!(IsSpent(wtxid, i)) && mine != ISMINE_NO &&
|
|
|
|
|
!IsLockedCoin((*it).first, i) && pcoin->vout[i].nValue > 0 &&
|
|
|
|
|
(!coinControl || !coinControl->HasSelected() || coinControl->IsSelected((*it).first, i)))
|
|
|
|
|
vCoins.push_back(COutput(pcoin, i, nDepth, mine & ISMINE_SPENDABLE));
|
|
|
|
|
vCoins.push_back(COutput(pcoin, i, nDepth, (mine & ISMINE_SPENDABLE) != ISMINE_NO));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -1655,7 +1655,7 @@ bool CWallet::SetAddressBook(const CTxDestination& address, const string& strNam
|
|
|
|
|
if (!strPurpose.empty()) /* update purpose only if requested */
|
|
|
|
|
mapAddressBook[address].purpose = strPurpose;
|
|
|
|
|
}
|
|
|
|
|
NotifyAddressBookChanged(this, address, strName, ::IsMine(*this, address),
|
|
|
|
|
NotifyAddressBookChanged(this, address, strName, ::IsMine(*this, address) != ISMINE_NO,
|
|
|
|
|
strPurpose, (fUpdated ? CT_UPDATED : CT_NEW) );
|
|
|
|
|
if (!fFileBacked)
|
|
|
|
|
return false;
|
|
|
|
@ -1681,7 +1681,7 @@ bool CWallet::DelAddressBook(const CTxDestination& address)
|
|
|
|
|
mapAddressBook.erase(address);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
NotifyAddressBookChanged(this, address, "", ::IsMine(*this, address), "", CT_DELETED);
|
|
|
|
|
NotifyAddressBookChanged(this, address, "", ::IsMine(*this, address) != ISMINE_NO, "", CT_DELETED);
|
|
|
|
|
|
|
|
|
|
if (!fFileBacked)
|
|
|
|
|
return false;
|
|
|
|
|