MCPcopy Create free account
hub / github.com/nodejs/node / buildPayload

Function buildPayload

test/parallel/test-quic-stream-recv-coalescing.mjs:35–41  ·  view source on GitHub ↗
(size, seed)

Source from the content-addressed store, hash-verified

33
34// Build deterministic payloads for integrity checking.
35function buildPayload(size, seed) {
36 const buf = new Uint8Array(size);
37 for (let i = 0; i < size; i++) {
38 buf[i] = (seed + i) & 0xff;
39 }
40 return buf;
41}
42
43function checksum(data) {
44 let sum = 0;

Calls

no outgoing calls

Tested by

no test coverage detected