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

Function OutputGetChange

src/wallet/receive.cpp:79–85  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

77}
78
79CAmount OutputGetChange(const CWallet& wallet, const CTxOut& txout)
80{
81 AssertLockHeld(wallet.cs_wallet);
82 if (!MoneyRange(txout.nValue))
83 throw std::runtime_error(std::string(__func__) + ": value out of range");
84 return (OutputIsChange(wallet, txout) ? txout.nValue : 0);
85}
86
87CAmount TxGetChange(const CWallet& wallet, const CTransaction& tx)
88{

Callers 1

TxGetChangeFunction · 0.85

Calls 2

MoneyRangeFunction · 0.85
OutputIsChangeFunction · 0.85

Tested by

no test coverage detected