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

Function ConsumePrivateKey

src/test/fuzz/util.cpp:230–238  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

228}
229
230CKey ConsumePrivateKey(FuzzedDataProvider& fuzzed_data_provider, std::optional<bool> compressed) noexcept
231{
232 auto key_data = fuzzed_data_provider.ConsumeBytes<uint8_t>(32);
233 key_data.resize(32);
234 CKey key;
235 bool compressed_value = compressed ? *compressed : fuzzed_data_provider.ConsumeBool();
236 key.Set(key_data.begin(), key_data.end(), compressed_value);
237 return key;
238}
239
240bool ContainsSpentInput(const CTransaction& tx, const CCoinsViewCache& inputs) noexcept
241{

Callers 7

bip324.cppFile · 0.85
MakeV2TransportFunction · 0.85
script_sign.cppFile · 0.85
key.cppFile · 0.85
ConsumeScalarRPCArgumentFunction · 0.85
message.cppFile · 0.85

Calls 5

ConsumeBoolMethod · 0.80
resizeMethod · 0.45
SetMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected