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

Method Add

src/wallet/spend.cpp:236–244  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

234}
235
236void CoinsResult::Add(OutputType type, const COutput& out)
237{
238 coins[type].emplace_back(out);
239 total_amount += out.txout.nValue;
240 if (out.HasEffectiveValue()) {
241 total_effective_amount = total_effective_amount.has_value() ?
242 *total_effective_amount + out.GetEffectiveValue() : out.GetEffectiveValue();
243 }
244}
245
246static OutputType GetOutputType(TxoutType type, bool is_from_p2sh)
247{

Callers 15

FetchSelectedInputsFunction · 0.45
AvailableCoinsFunction · 0.45
add_coinFunction · 0.45
BOOST_AUTO_TEST_CASEFunction · 0.45
addCoinFunction · 0.45
MakeScriptsMethod · 0.45
BOOST_AUTO_TEST_CASEFunction · 0.45
AddMultiFunction · 0.45
BOOST_AUTO_TEST_CASEFunction · 0.45
BOOST_AUTO_TEST_CASEFunction · 0.45
Correct_Queue_rangeMethod · 0.45
BOOST_AUTO_TEST_CASEFunction · 0.45

Calls 4

HasEffectiveValueMethod · 0.80
GetEffectiveValueMethod · 0.80
emplace_backMethod · 0.45
has_valueMethod · 0.45

Tested by 15

add_coinFunction · 0.36
BOOST_AUTO_TEST_CASEFunction · 0.36
addCoinFunction · 0.36
BOOST_AUTO_TEST_CASEFunction · 0.36
AddMultiFunction · 0.36
BOOST_AUTO_TEST_CASEFunction · 0.36
BOOST_AUTO_TEST_CASEFunction · 0.36
Correct_Queue_rangeMethod · 0.36
BOOST_AUTO_TEST_CASEFunction · 0.36
BOOST_AUTO_TEST_CASEFunction · 0.36
BOOST_AUTO_TEST_CASEFunction · 0.36
BOOST_AUTO_TEST_CASEFunction · 0.36