MCPcopy Create free account
hub / github.com/Bitcoin-ABC/bitcoin-abc / MakeNewKeyWithFastRandomContext

Function MakeNewKeyWithFastRandomContext

src/test/orphanage_tests.cpp:47–54  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

45};
46
47static void MakeNewKeyWithFastRandomContext(CKey &key,
48 FastRandomContext &rand_ctx) {
49 std::vector<uint8_t> keydata;
50 keydata = rand_ctx.randbytes(32);
51 key.Set(keydata.data(), keydata.data() + keydata.size(),
52 /*fCompressedIn=*/true);
53 assert(key.IsValid());
54}
55
56// Creates a transaction with 2 outputs. Spends all outpoints. If outpoints is
57// empty, spends a random one.

Callers 2

MakeTransactionSpendingFunction · 0.85
BOOST_AUTO_TEST_CASEFunction · 0.85

Calls 5

randbytesMethod · 0.80
SetMethod · 0.45
dataMethod · 0.45
sizeMethod · 0.45
IsValidMethod · 0.45

Tested by

no test coverage detected