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

Function add_coin

src/wallet/test/coinselector_tests.cpp:42–50  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

40static int nextLockTime = 0;
41
42static void add_coin(const CAmount& nValue, int nInput, std::vector<CInputCoin>& set)
43{
44 CMutableTransaction tx;
45 tx.vout.resize(nInput + 1);
46 tx.vout[nInput].nValue = nValue;
47 tx.nLockTime = nextLockTime++; // so all transactions get different hashes
48 CWalletTx wtx(MakeTransactionRef(tx), TxStateInactive{});
49 set.emplace_back(testWallet, &wtx, nInput);
50}
51
52static void add_coin(const CAmount& nValue, int nInput, SelectionResult& result)
53{

Callers 2

make_hard_caseFunction · 0.70
BOOST_AUTO_TEST_CASEFunction · 0.70

Calls 12

GetScriptForDestinationFunction · 0.85
CAssetClass · 0.85
emplace_backMethod · 0.80
MakeTransactionRefFunction · 0.50
resizeMethod · 0.45
InsertMethod · 0.45
AddInputMethod · 0.45
insertMethod · 0.45
GetNewDestinationMethod · 0.45
GetHashMethod · 0.45
SetMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected