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

Function DecodeType

src/util/asmap.cpp:141–144  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

139// Instruction type encoding: RETURN=[0], JUMP=[1,0], MATCH=[1,1,0], DEFAULT=[1,1,1]
140constexpr uint8_t TYPE_BIT_SIZES[]{0, 0, 1};
141Instruction DecodeType(size_t& bitpos, const std::span<const std::byte> data)
142{
143 return Instruction(DecodeBits(bitpos, data, 0, TYPE_BIT_SIZES));
144}
145
146// ASN encoding: Can encode ASNs from 1 to ~16.7 million.
147// Uses variable-length encoding optimized for real-world ASN distribution.

Callers 2

InterpretFunction · 0.85
SanityCheckAsmapFunction · 0.85

Calls 2

InstructionEnum · 0.85
DecodeBitsFunction · 0.85

Tested by

no test coverage detected