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

Function random_keys

src/test/txvalidation_tests.cpp:66–75  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

64}
65
66static inline std::vector<CPubKey> random_keys(size_t num_keys) {
67 std::vector<CPubKey> keys;
68 keys.reserve(num_keys);
69 for (size_t i{0}; i < num_keys; ++i) {
70 CKey key;
71 key.MakeNewKey(true);
72 keys.emplace_back(key.GetPubKey());
73 }
74 return keys;
75}
76
77// Creates a placeholder tx (not valid) with 25 outputs. Specify the version and the inputs.
78static inline CTransactionRef make_tx(const std::vector<COutPoint>& inputs, int32_t version)

Callers 1

BOOST_FIXTURE_TEST_CASEFunction · 0.85

Calls 4

MakeNewKeyMethod · 0.80
reserveMethod · 0.45
emplace_backMethod · 0.45
GetPubKeyMethod · 0.45

Tested by

no test coverage detected