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