MCPcopy Create free account
hub / github.com/PageLeay/celestial-runtime / checkOffset

Function checkOffset

lib.commonjs/utils/rlp-decode.js:39–43  ·  view source on GitHub ↗
(offset)

Source from the content-addressed store, hash-verified

37 buffer: data, length: 0, offset: 1
38 });
39 const checkOffset = (offset) => {
40 (0, errors_js_1.assert)(offset <= data.length, "data short segment too short", "BUFFER_OVERRUN", {
41 buffer: data, length: data.length, offset
42 });
43 };
44 // Array with extra length prefix
45 if (data[offset] >= 0xf8) {
46 const lengthLength = data[offset] - 0xf7;

Callers 1

_decodeFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected