mirror of
https://github.com/dashpay/dash.git
synced 2024-12-28 21:42:47 +01:00
every ds related function should ignore ix depth and use blockchain depth instead
This commit is contained in:
parent
ffec62e8ba
commit
a59e3ae3d3
@ -1096,7 +1096,7 @@ int64_t CWallet::GetAnonymizedBalance() const
|
|||||||
if (pcoin->IsTrusted()){
|
if (pcoin->IsTrusted()){
|
||||||
for (unsigned int i = 0; i < pcoin->vout.size(); i++) {
|
for (unsigned int i = 0; i < pcoin->vout.size(); i++) {
|
||||||
|
|
||||||
COutput out = COutput(pcoin, i, pcoin->GetDepthInMainChain());
|
COutput out = COutput(pcoin, i, pcoin->GetDepthInMainChain(false));
|
||||||
CTxIn vin = CTxIn(out.tx->GetHash(), out.i);
|
CTxIn vin = CTxIn(out.tx->GetHash(), out.i);
|
||||||
|
|
||||||
if(IsSpent(out.tx->GetHash(), i) || !IsMine(pcoin->vout[i]) || !IsDenominated(vin)) continue;
|
if(IsSpent(out.tx->GetHash(), i) || !IsMine(pcoin->vout[i]) || !IsDenominated(vin)) continue;
|
||||||
@ -1126,7 +1126,7 @@ double CWallet::GetAverageAnonymizedRounds() const
|
|||||||
|
|
||||||
for (unsigned int i = 0; i < pcoin->vout.size(); i++) {
|
for (unsigned int i = 0; i < pcoin->vout.size(); i++) {
|
||||||
|
|
||||||
COutput out = COutput(pcoin, i, pcoin->GetDepthInMainChain());
|
COutput out = COutput(pcoin, i, pcoin->GetDepthInMainChain(false));
|
||||||
CTxIn vin = CTxIn(out.tx->GetHash(), out.i);
|
CTxIn vin = CTxIn(out.tx->GetHash(), out.i);
|
||||||
|
|
||||||
if(IsSpent(out.tx->GetHash(), i) || !IsMine(pcoin->vout[i]) || !IsDenominated(vin)) continue;
|
if(IsSpent(out.tx->GetHash(), i) || !IsMine(pcoin->vout[i]) || !IsDenominated(vin)) continue;
|
||||||
@ -1154,7 +1154,7 @@ int64_t CWallet::GetNormalizedAnonymizedBalance() const
|
|||||||
const CWalletTx* pcoin = &(*it).second;
|
const CWalletTx* pcoin = &(*it).second;
|
||||||
for (unsigned int i = 0; i < pcoin->vout.size(); i++) {
|
for (unsigned int i = 0; i < pcoin->vout.size(); i++) {
|
||||||
|
|
||||||
COutput out = COutput(pcoin, i, pcoin->GetDepthInMainChain());
|
COutput out = COutput(pcoin, i, pcoin->GetDepthInMainChain(false));
|
||||||
CTxIn vin = CTxIn(out.tx->GetHash(), out.i);
|
CTxIn vin = CTxIn(out.tx->GetHash(), out.i);
|
||||||
|
|
||||||
if(IsSpent(out.tx->GetHash(), i) || !IsMine(pcoin->vout[i]) || !IsDenominated(vin)) continue;
|
if(IsSpent(out.tx->GetHash(), i) || !IsMine(pcoin->vout[i]) || !IsDenominated(vin)) continue;
|
||||||
@ -1179,10 +1179,10 @@ int64_t CWallet::GetDenominatedBalance(bool onlyDenom, bool onlyUnconfirmed) con
|
|||||||
|
|
||||||
for (unsigned int i = 0; i < pcoin->vout.size(); i++)
|
for (unsigned int i = 0; i < pcoin->vout.size(); i++)
|
||||||
{
|
{
|
||||||
COutput out = COutput(pcoin, i, pcoin->GetDepthInMainChain());
|
COutput out = COutput(pcoin, i, pcoin->GetDepthInMainChain(false));
|
||||||
CTxIn vin = CTxIn(out.tx->GetHash(), out.i);
|
CTxIn vin = CTxIn(out.tx->GetHash(), out.i);
|
||||||
|
|
||||||
bool unconfirmed = (!IsFinalTx(*pcoin) || (!pcoin->IsTrusted() && pcoin->GetDepthInMainChain() == 0));
|
bool unconfirmed = (!IsFinalTx(*pcoin) || (!pcoin->IsTrusted() && pcoin->GetDepthInMainChain(false) == 0));
|
||||||
|
|
||||||
if(IsSpent(out.tx->GetHash(), i)) continue;
|
if(IsSpent(out.tx->GetHash(), i)) continue;
|
||||||
if(!IsMine(pcoin->vout[i])) continue;
|
if(!IsMine(pcoin->vout[i])) continue;
|
||||||
|
Loading…
Reference in New Issue
Block a user