MCPcopy Create free account
hub / github.com/ElementsProject/elements / CachedTxGetCredit

Function CachedTxGetCredit

src/wallet/receive.cpp:157–172  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

155}
156
157CAmountMap CachedTxGetCredit(const CWallet& wallet, const CWalletTx& wtx, const isminefilter& filter)
158{
159 // Must wait until coinbase is safely deep enough in the chain before valuing it
160 if (wallet.IsTxImmatureCoinBase(wtx))
161 return CAmountMap();
162
163 CAmountMap credit;
164 if (filter & ISMINE_SPENDABLE) {
165 // GetBalance can assume transactions in mapWallet won't change
166 credit += GetCachableAmount(wallet, wtx, CWalletTx::CREDIT, ISMINE_SPENDABLE);
167 }
168 if (filter & ISMINE_WATCH_ONLY) {
169 credit += GetCachableAmount(wallet, wtx, CWalletTx::CREDIT, ISMINE_WATCH_ONLY);
170 }
171 return credit;
172}
173
174CAmountMap CachedTxGetDebit(const CWallet& wallet, const CWalletTx& wtx, const isminefilter& filter)
175 {

Callers 2

MakeWalletTxFunction · 0.85
transactions.cppFile · 0.85

Calls 2

GetCachableAmountFunction · 0.85
IsTxImmatureCoinBaseMethod · 0.80

Tested by

no test coverage detected