From 129b5242ade6a97a71810f492b5b347be219b691 Mon Sep 17 00:00:00 2001 From: Paul Date: Tue, 26 Jun 2018 09:17:05 -0500 Subject: [PATCH 01/10] .gitnore visual studio bs --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 54ee8b6b5a10e..6226ae5b080e0 100644 --- a/.gitignore +++ b/.gitignore @@ -40,6 +40,7 @@ src/config/dash-config.h.in src/config/stamp-h1 share/setup.nsi share/qt/Info.plist +/.vs src/univalue/gen From 5f4e3b3a6762f169f8137549df7d2446342179fb Mon Sep 17 00:00:00 2001 From: Paul Date: Tue, 26 Jun 2018 09:28:47 -0500 Subject: [PATCH 02/10] Improves the readability of the `GetOutpointPrivateSendRounds` function by not having the second argument be needed, as the second arg should only not be 0 when it is recursively calling itself --- src/wallet/wallet.cpp | 8 ++++++-- src/wallet/wallet.h | 5 +++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index b2aa465b5396b..585dbd007b3d6 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -1422,8 +1422,12 @@ CAmount CWallet::GetDebit(const CTxIn &txin, const isminefilter& filter) const } return 0; } +// Starts the recursive function which determines the rounds of a given input (How deep is the PrivateSend chain for a given input) +int CWallet::GetRealOutpointPrivateSendRounds(const COutPoint& outpoint) const +{ + return GetRealOutpointPrivateSendRounds(outpoint, 0); +} -// Recursively determine the rounds of a given input (How deep is the PrivateSend chain for a given input) int CWallet::GetRealOutpointPrivateSendRounds(const COutPoint& outpoint, int nRounds) const { static std::map mDenomWtxes; @@ -1509,7 +1513,7 @@ int CWallet::GetRealOutpointPrivateSendRounds(const COutPoint& outpoint, int nRo int CWallet::GetOutpointPrivateSendRounds(const COutPoint& outpoint) const { LOCK(cs_wallet); - int realPrivateSendRounds = GetRealOutpointPrivateSendRounds(outpoint, 0); + int realPrivateSendRounds = GetRealOutpointPrivateSendRounds(outpoint); return realPrivateSendRounds > privateSendClient.nPrivateSendRounds ? privateSendClient.nPrivateSendRounds : realPrivateSendRounds; } diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h index 65caff1f7867f..2d758591c928f 100644 --- a/src/wallet/wallet.h +++ b/src/wallet/wallet.h @@ -819,8 +819,9 @@ class CWallet : public CCryptoKeyStore, public CValidationInterface bool HasCollateralInputs(bool fOnlyConfirmed = true) const; int CountInputsWithAmount(CAmount nInputAmount); - // get the PrivateSend chain depth for a given input - int GetRealOutpointPrivateSendRounds(const COutPoint& outpoint, int nRounds) const; + // get the PrivateSend chain depth for a given input + int GetRealOutpointPrivateSendRounds(const COutPoint& outpoint) const; + int GetRealOutpointPrivateSendRounds(const COutPoint& outpoint, int nRounds) const; // respect current settings int GetOutpointPrivateSendRounds(const COutPoint& outpoint) const; From 8e8a75c46d79cab1519e91b27e03db9c45d306de Mon Sep 17 00:00:00 2001 From: Paul Date: Tue, 26 Jun 2018 10:16:02 -0500 Subject: [PATCH 03/10] Revert ".gitnore visual studio bs" This reverts commit 129b5242ade6a97a71810f492b5b347be219b691. --- .gitignore | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitignore b/.gitignore index 6226ae5b080e0..54ee8b6b5a10e 100644 --- a/.gitignore +++ b/.gitignore @@ -40,7 +40,6 @@ src/config/dash-config.h.in src/config/stamp-h1 share/setup.nsi share/qt/Info.plist -/.vs src/univalue/gen From d71435e1528bdf2dd5dffb7ab72c614d8c2c8945 Mon Sep 17 00:00:00 2001 From: Paul Date: Tue, 26 Jun 2018 10:21:45 -0500 Subject: [PATCH 04/10] changed back comment and fixed allignment --- src/wallet/wallet.cpp | 3 ++- src/wallet/wallet.h | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 585dbd007b3d6..841b110a96aaf 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -1422,7 +1422,8 @@ CAmount CWallet::GetDebit(const CTxIn &txin, const isminefilter& filter) const } return 0; } -// Starts the recursive function which determines the rounds of a given input (How deep is the PrivateSend chain for a given input) + +// Recursively determine the rounds of a given input (How deep is the PrivateSend chain for a given input) int CWallet::GetRealOutpointPrivateSendRounds(const COutPoint& outpoint) const { return GetRealOutpointPrivateSendRounds(outpoint, 0); diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h index 2d758591c928f..2166966d90f7f 100644 --- a/src/wallet/wallet.h +++ b/src/wallet/wallet.h @@ -821,7 +821,7 @@ class CWallet : public CCryptoKeyStore, public CValidationInterface // get the PrivateSend chain depth for a given input int GetRealOutpointPrivateSendRounds(const COutPoint& outpoint) const; - int GetRealOutpointPrivateSendRounds(const COutPoint& outpoint, int nRounds) const; + int GetRealOutpointPrivateSendRounds(const COutPoint& outpoint, int nRounds) const; // respect current settings int GetOutpointPrivateSendRounds(const COutPoint& outpoint) const; From 72944f170a0d3029f9c5370b29c100c8bb209afb Mon Sep 17 00:00:00 2001 From: Paul Date: Tue, 26 Jun 2018 12:36:47 -0500 Subject: [PATCH 05/10] refactor based on Udjin's suggestions. --- src/qt/coincontroldialog.cpp | 4 ++-- src/wallet/rpcwallet.cpp | 2 +- src/wallet/wallet.cpp | 18 +++++++++--------- src/wallet/wallet.h | 5 ++--- 4 files changed, 14 insertions(+), 15 deletions(-) diff --git a/src/qt/coincontroldialog.cpp b/src/qt/coincontroldialog.cpp index ae07319657f62..b5c29fc8814c5 100644 --- a/src/qt/coincontroldialog.cpp +++ b/src/qt/coincontroldialog.cpp @@ -433,7 +433,7 @@ void CoinControlDialog::viewItemChanged(QTreeWidgetItem* item, int column) item->setCheckState(COLUMN_CHECKBOX, Qt::Unchecked); else { coinControl->Select(outpt); - int nRounds = pwalletMain->GetOutpointPrivateSendRounds(outpt); + int nRounds = pwalletMain->GetCappedOutpointPrivateSendRounds(outpt); if (coinControl->fUsePrivateSend && nRounds < privateSendClient.nPrivateSendRounds) { QMessageBox::warning(this, windowTitle(), tr("Non-anonymized input selected. PrivateSend will be disabled.

If you still want to use PrivateSend, please deselect all non-nonymized inputs first and then check PrivateSend checkbox again."), @@ -781,7 +781,7 @@ void CoinControlDialog::updateView() // PrivateSend rounds COutPoint outpoint = COutPoint(out.tx->tx->GetHash(), out.i); - int nRounds = pwalletMain->GetOutpointPrivateSendRounds(outpoint); + int nRounds = pwalletMain->GetCappedOutpointPrivateSendRounds(outpoint); if (nRounds >= 0 || fDebug) itemOutput->setText(COLUMN_PRIVATESEND_ROUNDS, QString::number(nRounds)); else itemOutput->setText(COLUMN_PRIVATESEND_ROUNDS, tr("n/a")); diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp index 96060030381a5..54daf6c4a4f68 100644 --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -2647,7 +2647,7 @@ UniValue listunspent(const JSONRPCRequest& request) entry.push_back(Pair("confirmations", out.nDepth)); entry.push_back(Pair("spendable", out.fSpendable)); entry.push_back(Pair("solvable", out.fSolvable)); - entry.push_back(Pair("ps_rounds", pwalletMain->GetOutpointPrivateSendRounds(COutPoint(out.tx->GetHash(), out.i)))); + entry.push_back(Pair("ps_rounds", pwalletMain->GetCappedOutpointPrivateSendRounds(COutPoint(out.tx->GetHash(), out.i)))); results.push_back(entry); } diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 841b110a96aaf..3da44d694cd5d 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -1511,7 +1511,7 @@ int CWallet::GetRealOutpointPrivateSendRounds(const COutPoint& outpoint, int nRo } // respect current settings -int CWallet::GetOutpointPrivateSendRounds(const COutPoint& outpoint) const +int CWallet::GetCappedOutpointPrivateSendRounds(const COutPoint& outpoint) const { LOCK(cs_wallet); int realPrivateSendRounds = GetRealOutpointPrivateSendRounds(outpoint); @@ -2177,7 +2177,7 @@ CAmount CWalletTx::GetAnonymizedCredit(bool fUseCache) const if(pwallet->IsSpent(hashTx, i) || !pwallet->IsDenominated(outpoint)) continue; - const int nRounds = pwallet->GetOutpointPrivateSendRounds(outpoint); + const int nRounds = pwallet->GetCappedOutpointPrivateSendRounds(outpoint); if(nRounds >= privateSendClient.nPrivateSendRounds){ nCredit += pwallet->GetCredit(txout, ISMINE_SPENDABLE); if (!MoneyRange(nCredit)) @@ -2425,7 +2425,7 @@ float CWallet::GetAverageAnonymizedRounds() const for (const auto& outpoint : setWalletUTXO) { if(!IsDenominated(outpoint)) continue; - nTotal += GetOutpointPrivateSendRounds(outpoint); + nTotal += GetCappedOutpointPrivateSendRounds(outpoint); nCount++; } @@ -2449,7 +2449,7 @@ CAmount CWallet::GetNormalizedAnonymizedBalance() const if (!IsDenominated(outpoint)) continue; if (it->second.GetDepthInMainChain() < 0) continue; - int nRounds = GetOutpointPrivateSendRounds(outpoint); + int nRounds = GetCappedOutpointPrivateSendRounds(outpoint); nTotal += it->second.tx->vout[outpoint.n].nValue * nRounds / privateSendClient.nPrivateSendRounds; } @@ -2849,7 +2849,7 @@ bool CWallet::SelectCoins(const std::vector& vAvailableCoins, const CAm if(nCoinType == ONLY_DENOMINATED) { COutPoint outpoint = COutPoint(out.tx->GetHash(),out.i); - int nRounds = GetOutpointPrivateSendRounds(outpoint); + int nRounds = GetCappedOutpointPrivateSendRounds(outpoint); // make sure it's actually anonymized if(nRounds < privateSendClient.nPrivateSendRounds) continue; } @@ -2872,7 +2872,7 @@ bool CWallet::SelectCoins(const std::vector& vAvailableCoins, const CAm //make sure it's the denom we're looking for, round the amount up to smallest denom if(out.tx->tx->vout[out.i].nValue == nDenom && nValueRet + nDenom < nTargetValue + nSmallestDenom) { COutPoint outpoint = COutPoint(out.tx->GetHash(),out.i); - int nRounds = GetOutpointPrivateSendRounds(outpoint); + int nRounds = GetCappedOutpointPrivateSendRounds(outpoint); // make sure it's actually anonymized if(nRounds < privateSendClient.nPrivateSendRounds) continue; nValueRet += nDenom; @@ -3033,7 +3033,7 @@ bool CWallet::SelectCoinsByDenominations(int nDenom, CAmount nValueMin, CAmount CTxIn txin = CTxIn(out.tx->GetHash(), out.i); - int nRounds = GetOutpointPrivateSendRounds(txin.prevout); + int nRounds = GetCappedOutpointPrivateSendRounds(txin.prevout); if(nRounds >= nPrivateSendRoundsMax) continue; if(nRounds < nPrivateSendRoundsMin) continue; @@ -3117,7 +3117,7 @@ bool CWallet::SelectCoinsGrouppedByAddresses(std::vector& vecT // otherwise they will just lead to higher fee / lower priority if(wtx.tx->vout[i].nValue <= nSmallestDenom/10) continue; // ignore anonymized - if(GetOutpointPrivateSendRounds(COutPoint(outpoint.hash, i)) >= privateSendClient.nPrivateSendRounds) continue; + if(GetCappedOutpointPrivateSendRounds(COutPoint(outpoint.hash, i)) >= privateSendClient.nPrivateSendRounds) continue; } CompactTallyItem& item = mapTally[txdest]; @@ -3183,7 +3183,7 @@ bool CWallet::SelectCoinsDark(CAmount nValueMin, CAmount nValueMax, std::vector< if(nValueRet + out.tx->tx->vout[out.i].nValue <= nValueMax){ CTxIn txin = CTxIn(out.tx->GetHash(),out.i); - int nRounds = GetOutpointPrivateSendRounds(txin.prevout); + int nRounds = GetCappedOutpointPrivateSendRounds(txin.prevout); if(nRounds >= nPrivateSendRoundsMax) continue; if(nRounds < nPrivateSendRoundsMin) continue; diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h index 2166966d90f7f..2f9244e024099 100644 --- a/src/wallet/wallet.h +++ b/src/wallet/wallet.h @@ -820,10 +820,9 @@ class CWallet : public CCryptoKeyStore, public CValidationInterface int CountInputsWithAmount(CAmount nInputAmount); // get the PrivateSend chain depth for a given input - int GetRealOutpointPrivateSendRounds(const COutPoint& outpoint) const; - int GetRealOutpointPrivateSendRounds(const COutPoint& outpoint, int nRounds) const; + int GetRealOutpointPrivateSendRounds(const COutPoint& outpoint, int nRounds = 0) const; // respect current settings - int GetOutpointPrivateSendRounds(const COutPoint& outpoint) const; + int GetCappedOutpointPrivateSendRounds(const COutPoint& outpoint) const; bool IsDenominated(const COutPoint& outpoint) const; From be582ad378ae61b486305440f4546cfc9db68326 Mon Sep 17 00:00:00 2001 From: Paul Date: Tue, 26 Jun 2018 12:36:47 -0500 Subject: [PATCH 06/10] refactor based on Udjin's suggestions. --- src/qt/coincontroldialog.cpp | 4 ++-- src/wallet/rpcwallet.cpp | 2 +- src/wallet/wallet.cpp | 23 +++++++++-------------- src/wallet/wallet.h | 7 +++---- 4 files changed, 15 insertions(+), 21 deletions(-) diff --git a/src/qt/coincontroldialog.cpp b/src/qt/coincontroldialog.cpp index ae07319657f62..b5c29fc8814c5 100644 --- a/src/qt/coincontroldialog.cpp +++ b/src/qt/coincontroldialog.cpp @@ -433,7 +433,7 @@ void CoinControlDialog::viewItemChanged(QTreeWidgetItem* item, int column) item->setCheckState(COLUMN_CHECKBOX, Qt::Unchecked); else { coinControl->Select(outpt); - int nRounds = pwalletMain->GetOutpointPrivateSendRounds(outpt); + int nRounds = pwalletMain->GetCappedOutpointPrivateSendRounds(outpt); if (coinControl->fUsePrivateSend && nRounds < privateSendClient.nPrivateSendRounds) { QMessageBox::warning(this, windowTitle(), tr("Non-anonymized input selected. PrivateSend will be disabled.

If you still want to use PrivateSend, please deselect all non-nonymized inputs first and then check PrivateSend checkbox again."), @@ -781,7 +781,7 @@ void CoinControlDialog::updateView() // PrivateSend rounds COutPoint outpoint = COutPoint(out.tx->tx->GetHash(), out.i); - int nRounds = pwalletMain->GetOutpointPrivateSendRounds(outpoint); + int nRounds = pwalletMain->GetCappedOutpointPrivateSendRounds(outpoint); if (nRounds >= 0 || fDebug) itemOutput->setText(COLUMN_PRIVATESEND_ROUNDS, QString::number(nRounds)); else itemOutput->setText(COLUMN_PRIVATESEND_ROUNDS, tr("n/a")); diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp index 96060030381a5..54daf6c4a4f68 100644 --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -2647,7 +2647,7 @@ UniValue listunspent(const JSONRPCRequest& request) entry.push_back(Pair("confirmations", out.nDepth)); entry.push_back(Pair("spendable", out.fSpendable)); entry.push_back(Pair("solvable", out.fSolvable)); - entry.push_back(Pair("ps_rounds", pwalletMain->GetOutpointPrivateSendRounds(COutPoint(out.tx->GetHash(), out.i)))); + entry.push_back(Pair("ps_rounds", pwalletMain->GetCappedOutpointPrivateSendRounds(COutPoint(out.tx->GetHash(), out.i)))); results.push_back(entry); } diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 841b110a96aaf..9396fa9e57614 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -1424,11 +1424,6 @@ CAmount CWallet::GetDebit(const CTxIn &txin, const isminefilter& filter) const } // Recursively determine the rounds of a given input (How deep is the PrivateSend chain for a given input) -int CWallet::GetRealOutpointPrivateSendRounds(const COutPoint& outpoint) const -{ - return GetRealOutpointPrivateSendRounds(outpoint, 0); -} - int CWallet::GetRealOutpointPrivateSendRounds(const COutPoint& outpoint, int nRounds) const { static std::map mDenomWtxes; @@ -1511,7 +1506,7 @@ int CWallet::GetRealOutpointPrivateSendRounds(const COutPoint& outpoint, int nRo } // respect current settings -int CWallet::GetOutpointPrivateSendRounds(const COutPoint& outpoint) const +int CWallet::GetCappedOutpointPrivateSendRounds(const COutPoint& outpoint) const { LOCK(cs_wallet); int realPrivateSendRounds = GetRealOutpointPrivateSendRounds(outpoint); @@ -2177,7 +2172,7 @@ CAmount CWalletTx::GetAnonymizedCredit(bool fUseCache) const if(pwallet->IsSpent(hashTx, i) || !pwallet->IsDenominated(outpoint)) continue; - const int nRounds = pwallet->GetOutpointPrivateSendRounds(outpoint); + const int nRounds = pwallet->GetCappedOutpointPrivateSendRounds(outpoint); if(nRounds >= privateSendClient.nPrivateSendRounds){ nCredit += pwallet->GetCredit(txout, ISMINE_SPENDABLE); if (!MoneyRange(nCredit)) @@ -2425,7 +2420,7 @@ float CWallet::GetAverageAnonymizedRounds() const for (const auto& outpoint : setWalletUTXO) { if(!IsDenominated(outpoint)) continue; - nTotal += GetOutpointPrivateSendRounds(outpoint); + nTotal += GetCappedOutpointPrivateSendRounds(outpoint); nCount++; } @@ -2449,7 +2444,7 @@ CAmount CWallet::GetNormalizedAnonymizedBalance() const if (!IsDenominated(outpoint)) continue; if (it->second.GetDepthInMainChain() < 0) continue; - int nRounds = GetOutpointPrivateSendRounds(outpoint); + int nRounds = GetCappedOutpointPrivateSendRounds(outpoint); nTotal += it->second.tx->vout[outpoint.n].nValue * nRounds / privateSendClient.nPrivateSendRounds; } @@ -2849,7 +2844,7 @@ bool CWallet::SelectCoins(const std::vector& vAvailableCoins, const CAm if(nCoinType == ONLY_DENOMINATED) { COutPoint outpoint = COutPoint(out.tx->GetHash(),out.i); - int nRounds = GetOutpointPrivateSendRounds(outpoint); + int nRounds = GetCappedOutpointPrivateSendRounds(outpoint); // make sure it's actually anonymized if(nRounds < privateSendClient.nPrivateSendRounds) continue; } @@ -2872,7 +2867,7 @@ bool CWallet::SelectCoins(const std::vector& vAvailableCoins, const CAm //make sure it's the denom we're looking for, round the amount up to smallest denom if(out.tx->tx->vout[out.i].nValue == nDenom && nValueRet + nDenom < nTargetValue + nSmallestDenom) { COutPoint outpoint = COutPoint(out.tx->GetHash(),out.i); - int nRounds = GetOutpointPrivateSendRounds(outpoint); + int nRounds = GetCappedOutpointPrivateSendRounds(outpoint); // make sure it's actually anonymized if(nRounds < privateSendClient.nPrivateSendRounds) continue; nValueRet += nDenom; @@ -3033,7 +3028,7 @@ bool CWallet::SelectCoinsByDenominations(int nDenom, CAmount nValueMin, CAmount CTxIn txin = CTxIn(out.tx->GetHash(), out.i); - int nRounds = GetOutpointPrivateSendRounds(txin.prevout); + int nRounds = GetCappedOutpointPrivateSendRounds(txin.prevout); if(nRounds >= nPrivateSendRoundsMax) continue; if(nRounds < nPrivateSendRoundsMin) continue; @@ -3117,7 +3112,7 @@ bool CWallet::SelectCoinsGrouppedByAddresses(std::vector& vecT // otherwise they will just lead to higher fee / lower priority if(wtx.tx->vout[i].nValue <= nSmallestDenom/10) continue; // ignore anonymized - if(GetOutpointPrivateSendRounds(COutPoint(outpoint.hash, i)) >= privateSendClient.nPrivateSendRounds) continue; + if(GetCappedOutpointPrivateSendRounds(COutPoint(outpoint.hash, i)) >= privateSendClient.nPrivateSendRounds) continue; } CompactTallyItem& item = mapTally[txdest]; @@ -3183,7 +3178,7 @@ bool CWallet::SelectCoinsDark(CAmount nValueMin, CAmount nValueMax, std::vector< if(nValueRet + out.tx->tx->vout[out.i].nValue <= nValueMax){ CTxIn txin = CTxIn(out.tx->GetHash(),out.i); - int nRounds = GetOutpointPrivateSendRounds(txin.prevout); + int nRounds = GetCappedOutpointPrivateSendRounds(txin.prevout); if(nRounds >= nPrivateSendRoundsMax) continue; if(nRounds < nPrivateSendRoundsMin) continue; diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h index 2166966d90f7f..ee7b9376c1474 100644 --- a/src/wallet/wallet.h +++ b/src/wallet/wallet.h @@ -819,11 +819,10 @@ class CWallet : public CCryptoKeyStore, public CValidationInterface bool HasCollateralInputs(bool fOnlyConfirmed = true) const; int CountInputsWithAmount(CAmount nInputAmount); - // get the PrivateSend chain depth for a given input - int GetRealOutpointPrivateSendRounds(const COutPoint& outpoint) const; - int GetRealOutpointPrivateSendRounds(const COutPoint& outpoint, int nRounds) const; + // get the PrivateSend chain depth for a given input + int GetRealOutpointPrivateSendRounds(const COutPoint& outpoint, int nRounds = 0) const; // respect current settings - int GetOutpointPrivateSendRounds(const COutPoint& outpoint) const; + int GetCappedOutpointPrivateSendRounds(const COutPoint& outpoint) const; bool IsDenominated(const COutPoint& outpoint) const; From c2cc2ae531c191258cd043b2b45a316443e4b860 Mon Sep 17 00:00:00 2001 From: Paul Date: Tue, 26 Jun 2018 13:27:39 -0500 Subject: [PATCH 07/10] fix alignment --- .gitignore | 1 + src/wallet/wallet.h | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 54ee8b6b5a10e..8956d4c33260b 100644 --- a/.gitignore +++ b/.gitignore @@ -133,3 +133,4 @@ make # CLion .idea cmake-build-debug +/.vs diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h index 2f9244e024099..1b8ec9c580329 100644 --- a/src/wallet/wallet.h +++ b/src/wallet/wallet.h @@ -819,7 +819,7 @@ class CWallet : public CCryptoKeyStore, public CValidationInterface bool HasCollateralInputs(bool fOnlyConfirmed = true) const; int CountInputsWithAmount(CAmount nInputAmount); - // get the PrivateSend chain depth for a given input + // get the PrivateSend chain depth for a given input int GetRealOutpointPrivateSendRounds(const COutPoint& outpoint, int nRounds = 0) const; // respect current settings int GetCappedOutpointPrivateSendRounds(const COutPoint& outpoint) const; @@ -1044,7 +1044,7 @@ class CWallet : public CCryptoKeyStore, public CValidationInterface //! get the current wallet format (the oldest client version guaranteed to understand this wallet) int GetVersion() { LOCK(cs_wallet); return nWalletVersion; } - + //! Get wallet transactions that conflict with given transaction (spend same outputs) std::set GetConflicts(const uint256& txid) const; From 89d771bf25f2664496f3a208d14a5135919ed1b7 Mon Sep 17 00:00:00 2001 From: Paul Date: Tue, 26 Jun 2018 13:29:11 -0500 Subject: [PATCH 08/10] Revert "fix alignment" This reverts commit c2cc2ae531c191258cd043b2b45a316443e4b860. --- .gitignore | 1 - src/wallet/wallet.h | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 8956d4c33260b..54ee8b6b5a10e 100644 --- a/.gitignore +++ b/.gitignore @@ -133,4 +133,3 @@ make # CLion .idea cmake-build-debug -/.vs diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h index 1b8ec9c580329..2f9244e024099 100644 --- a/src/wallet/wallet.h +++ b/src/wallet/wallet.h @@ -819,7 +819,7 @@ class CWallet : public CCryptoKeyStore, public CValidationInterface bool HasCollateralInputs(bool fOnlyConfirmed = true) const; int CountInputsWithAmount(CAmount nInputAmount); - // get the PrivateSend chain depth for a given input + // get the PrivateSend chain depth for a given input int GetRealOutpointPrivateSendRounds(const COutPoint& outpoint, int nRounds = 0) const; // respect current settings int GetCappedOutpointPrivateSendRounds(const COutPoint& outpoint) const; @@ -1044,7 +1044,7 @@ class CWallet : public CCryptoKeyStore, public CValidationInterface //! get the current wallet format (the oldest client version guaranteed to understand this wallet) int GetVersion() { LOCK(cs_wallet); return nWalletVersion; } - + //! Get wallet transactions that conflict with given transaction (spend same outputs) std::set GetConflicts(const uint256& txid) const; From 635de9b0c988a77e53b636ea361ee2315e5dd4f6 Mon Sep 17 00:00:00 2001 From: Paul Date: Tue, 26 Jun 2018 13:31:48 -0500 Subject: [PATCH 09/10] actually fix alignment --- src/wallet/wallet.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h index 2f9244e024099..ee7b9376c1474 100644 --- a/src/wallet/wallet.h +++ b/src/wallet/wallet.h @@ -819,7 +819,7 @@ class CWallet : public CCryptoKeyStore, public CValidationInterface bool HasCollateralInputs(bool fOnlyConfirmed = true) const; int CountInputsWithAmount(CAmount nInputAmount); - // get the PrivateSend chain depth for a given input + // get the PrivateSend chain depth for a given input int GetRealOutpointPrivateSendRounds(const COutPoint& outpoint, int nRounds = 0) const; // respect current settings int GetCappedOutpointPrivateSendRounds(const COutPoint& outpoint) const; From 6149a33163e8372914180e3884a64b88b24b84e9 Mon Sep 17 00:00:00 2001 From: Paul Date: Tue, 26 Jun 2018 13:31:48 -0500 Subject: [PATCH 10/10] actually fix alignment --- src/wallet/wallet.cpp | 2 +- src/wallet/wallet.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 9396fa9e57614..2260fc5da9c38 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -1423,7 +1423,7 @@ CAmount CWallet::GetDebit(const CTxIn &txin, const isminefilter& filter) const return 0; } -// Recursively determine the rounds of a given input (How deep is the PrivateSend chain for a given input) +// Recursively determine the rounds of a given input (How deep is the PrivateSend chain for a given input) int CWallet::GetRealOutpointPrivateSendRounds(const COutPoint& outpoint, int nRounds) const { static std::map mDenomWtxes; diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h index 2f9244e024099..ee7b9376c1474 100644 --- a/src/wallet/wallet.h +++ b/src/wallet/wallet.h @@ -819,7 +819,7 @@ class CWallet : public CCryptoKeyStore, public CValidationInterface bool HasCollateralInputs(bool fOnlyConfirmed = true) const; int CountInputsWithAmount(CAmount nInputAmount); - // get the PrivateSend chain depth for a given input + // get the PrivateSend chain depth for a given input int GetRealOutpointPrivateSendRounds(const COutPoint& outpoint, int nRounds = 0) const; // respect current settings int GetCappedOutpointPrivateSendRounds(const COutPoint& outpoint) const;