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

Function make_hard_case

src/wallet/test/coinselector_tests.cpp:140–150  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

138}
139
140static CAmount make_hard_case(int utxos, std::vector<CInputCoin>& utxo_pool)
141{
142 utxo_pool.clear();
143 CAmount target = 0;
144 for (int i = 0; i < utxos; ++i) {
145 target += (CAmount)1 << (utxos+i);
146 add_coin((CAmount)1 << (utxos+i), 2*i, utxo_pool);
147 add_coin(((CAmount)1 << (utxos+i)) + ((CAmount)1 << (utxos-1-i)), 2*i + 1, utxo_pool);
148 }
149 return target;
150}
151
152inline std::vector<OutputGroup>& GroupCoins(const std::vector<CInputCoin>& coins)
153{

Callers 1

BOOST_AUTO_TEST_CASEFunction · 0.70

Calls 2

add_coinFunction · 0.70
clearMethod · 0.45

Tested by

no test coverage detected