@@ -1493,14 +1493,15 @@ int CWallet::GetRealOutpointPrivateSendRounds(const COutPoint& outpoint, int nRo
14931493 uint256 hash = outpoint.hash ;
14941494 unsigned int nout = outpoint.n ;
14951495
1496+ // TODO wtx should refer to a CWalletTx object, not a pointer, based on surrounding code
14961497 const CWalletTx* wtx = GetWalletTx (hash);
14971498 if (wtx != nullptr )
14981499 {
14991500 std::map<uint256, CMutableTransaction>::const_iterator mdwi = mDenomWtxes .find (hash);
15001501 if (mdwi == mDenomWtxes .end ()) {
15011502 // not known yet, let's add it
15021503 LogPrint (BCLog::PRIVATESEND, " GetRealOutpointPrivateSendRounds INSERTING %s\n " , hash.ToString ());
1503- mDenomWtxes [hash] = CMutableTransaction (*wtx);
1504+ mDenomWtxes [hash] = CMutableTransaction (*wtx-> tx );
15041505 } else if (mDenomWtxes [hash].vout [nout].nRounds != -10 ) {
15051506 // found and it's not an initial value, just return it
15061507 return mDenomWtxes [hash].vout [nout].nRounds ;
@@ -2043,7 +2044,7 @@ bool CWalletTx::RelayWalletTransaction(CConnman* connman)
20432044 LogPrintf (" Relaying wtx %s\n " , hash.ToString ());
20442045
20452046 if (connman) {
2046- connman->RelayTransaction ((CTransaction)* this );
2047+ connman->RelayTransaction (*tx );
20472048 return true ;
20482049 }
20492050 }
@@ -2075,7 +2076,7 @@ CAmount CWalletTx::GetDebit(const isminefilter& filter) const
20752076 debit += nDebitCached;
20762077 else
20772078 {
2078- nDebitCached = pwallet->GetDebit (*this , ISMINE_SPENDABLE);
2079+ nDebitCached = pwallet->GetDebit (*tx , ISMINE_SPENDABLE);
20792080 fDebitCached = true ;
20802081 debit += nDebitCached;
20812082 }
@@ -2086,7 +2087,7 @@ CAmount CWalletTx::GetDebit(const isminefilter& filter) const
20862087 debit += nWatchDebitCached;
20872088 else
20882089 {
2089- nWatchDebitCached = pwallet->GetDebit (*this , ISMINE_WATCH_ONLY);
2090+ nWatchDebitCached = pwallet->GetDebit (*tx , ISMINE_WATCH_ONLY);
20902091 fWatchDebitCached = true ;
20912092 debit += nWatchDebitCached;
20922093 }
@@ -2108,7 +2109,7 @@ CAmount CWalletTx::GetCredit(const isminefilter& filter) const
21082109 credit += nCreditCached;
21092110 else
21102111 {
2111- nCreditCached = pwallet->GetCredit (*this , ISMINE_SPENDABLE);
2112+ nCreditCached = pwallet->GetCredit (*tx , ISMINE_SPENDABLE);
21122113 fCreditCached = true ;
21132114 credit += nCreditCached;
21142115 }
@@ -2119,7 +2120,7 @@ CAmount CWalletTx::GetCredit(const isminefilter& filter) const
21192120 credit += nWatchCreditCached;
21202121 else
21212122 {
2122- nWatchCreditCached = pwallet->GetCredit (*this , ISMINE_WATCH_ONLY);
2123+ nWatchCreditCached = pwallet->GetCredit (*tx , ISMINE_WATCH_ONLY);
21232124 fWatchCreditCached = true ;
21242125 credit += nWatchCreditCached;
21252126 }
@@ -2133,7 +2134,7 @@ CAmount CWalletTx::GetImmatureCredit(bool fUseCache) const
21332134 {
21342135 if (fUseCache && fImmatureCreditCached )
21352136 return nImmatureCreditCached;
2136- nImmatureCreditCached = pwallet->GetCredit (*this , ISMINE_SPENDABLE);
2137+ nImmatureCreditCached = pwallet->GetCredit (*tx , ISMINE_SPENDABLE);
21372138 fImmatureCreditCached = true ;
21382139 return nImmatureCreditCached;
21392140 }
@@ -2177,7 +2178,7 @@ CAmount CWalletTx::GetImmatureWatchOnlyCredit(const bool& fUseCache) const
21772178 {
21782179 if (fUseCache && fImmatureWatchCreditCached )
21792180 return nImmatureWatchCreditCached;
2180- nImmatureWatchCreditCached = pwallet->GetCredit (*this , ISMINE_WATCH_ONLY);
2181+ nImmatureWatchCreditCached = pwallet->GetCredit (*tx , ISMINE_WATCH_ONLY);
21812182 fImmatureWatchCreditCached = true ;
21822183 return nImmatureWatchCreditCached;
21832184 }
@@ -2297,7 +2298,7 @@ CAmount CWalletTx::GetChange() const
22972298{
22982299 if (fChangeCached )
22992300 return nChangeCached;
2300- nChangeCached = pwallet->GetChange (*this );
2301+ nChangeCached = pwallet->GetChange (*tx );
23012302 fChangeCached = true ;
23022303 return nChangeCached;
23032304}
@@ -2311,7 +2312,7 @@ bool CWalletTx::InMempool() const
23112312bool CWalletTx::IsTrusted () const
23122313{
23132314 // Quick answer in most cases
2314- if (!CheckFinalTx (*this ))
2315+ if (!CheckFinalTx (*tx ))
23152316 return false ;
23162317 int nDepth = GetDepthInMainChain ();
23172318 if (nDepth >= 1 )
@@ -2677,7 +2678,7 @@ void CWallet::AvailableCoins(std::vector<COutput> &vCoins, bool fOnlySafe, const
26772678 for (auto pcoin : GetSpendableTXs ()) {
26782679 const uint256& wtxid = pcoin->GetHash ();
26792680
2680- if (!CheckFinalTx (*pcoin))
2681+ if (!CheckFinalTx (*pcoin-> tx ))
26812682 continue ;
26822683
26832684 if (pcoin->IsCoinBase () && pcoin->GetBlocksToMaturity () > 0 )
0 commit comments