|
|
@ -1481,7 +1481,7 @@ CAmount CWallet::GetImmatureWatchOnlyBalance() const |
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* populate vCoins with vector of available COutputs. |
|
|
|
* populate vCoins with vector of available COutputs. |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
void CWallet::AvailableCoins(vector<COutput>& vCoins, bool fOnlyConfirmed, const CCoinControl *coinControl) const |
|
|
|
void CWallet::AvailableCoins(vector<COutput>& vCoins, bool fOnlyConfirmed, const CCoinControl *coinControl, bool fIncludeZeroValue) const |
|
|
|
{ |
|
|
|
{ |
|
|
|
vCoins.clear(); |
|
|
|
vCoins.clear(); |
|
|
|
|
|
|
|
|
|
|
@ -1508,7 +1508,7 @@ void CWallet::AvailableCoins(vector<COutput>& vCoins, bool fOnlyConfirmed, const |
|
|
|
for (unsigned int i = 0; i < pcoin->vout.size(); i++) { |
|
|
|
for (unsigned int i = 0; i < pcoin->vout.size(); i++) { |
|
|
|
isminetype mine = IsMine(pcoin->vout[i]); |
|
|
|
isminetype mine = IsMine(pcoin->vout[i]); |
|
|
|
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 || fIncludeZeroValue) && |
|
|
|
(!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) != ISMINE_NO)); |
|
|
|
vCoins.push_back(COutput(pcoin, i, nDepth, (mine & ISMINE_SPENDABLE) != ISMINE_NO)); |
|
|
|
} |
|
|
|
} |
|
|
|