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

Function ConsumeValueSize

src/test/fuzz/dbwrapper.cpp:133–138  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

131
132uint16_t ConsumeKey(FuzzedDataProvider& provider) { return provider.ConsumeIntegral<uint16_t>(); }
133uint32_t ConsumeValueSize(FuzzedDataProvider& provider)
134{
135 const uint16_t len{provider.ConsumeIntegralInRange<uint16_t>(0, MAX_VALUE_LEN)};
136 const uint8_t multiplier{provider.ConsumeIntegralInRange<uint8_t>(1, MAX_VALUE_MULTIPLIER)};
137 return static_cast<uint32_t>(len) * multiplier;
138}
139
140/** Verify that the DB iterator matches the oracle, handling the obfuscation
141 * metadata entry (stored under a non-uint16_t key) when obfuscation is on. */

Callers 2

TestDbWrapperFunction · 0.85
dbwrapper.cppFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected