MCPcopy Create free account
hub / github.com/bitcoin/bitcoin / CachedTxGetCredit

Function CachedTxGetCredit

src/wallet/receive.cpp:110–120  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

108}
109
110CAmount CachedTxGetCredit(const CWallet& wallet, const CWalletTx& wtx, bool avoid_reuse)
111{
112 AssertLockHeld(wallet.cs_wallet);
113
114 // Must wait until coinbase is safely deep enough in the chain before valuing it
115 if (wallet.IsTxImmatureCoinBase(wtx))
116 return 0;
117
118 // GetBalance can assume transactions in mapWallet won't change
119 return GetCachableAmount(wallet, wtx, CWalletTx::CREDIT, avoid_reuse);
120}
121
122CAmount CachedTxGetDebit(const CWallet& wallet, const CWalletTx& wtx, bool avoid_reuse)
123{

Callers 2

MakeWalletTxFunction · 0.85
gettransactionFunction · 0.85

Calls 2

GetCachableAmountFunction · 0.85
IsTxImmatureCoinBaseMethod · 0.80

Tested by

no test coverage detected