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

Function GenerateRandomGarbage

src/net.cpp:983–990  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

981const V2MessageMap V2_MESSAGE_MAP;
982
983std::vector<uint8_t> GenerateRandomGarbage() noexcept
984{
985 std::vector<uint8_t> ret;
986 FastRandomContext rng;
987 ret.resize(rng.randrange(V2Transport::MAX_GARBAGE_LEN + 1));
988 rng.fillrand(MakeWritableByteSpan(ret));
989 return ret;
990}
991
992} // namespace
993

Callers 1

V2TransportMethod · 0.85

Calls 4

MakeWritableByteSpanFunction · 0.85
randrangeMethod · 0.80
resizeMethod · 0.45
fillrandMethod · 0.45

Tested by

no test coverage detected