smoldot 2.0.32 → 2.0.34
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/internals/bytecode/wasm0.js +1 -1
- package/dist/cjs/internals/bytecode/wasm1.js +1 -1
- package/dist/cjs/internals/bytecode/wasm2.js +1 -1
- package/dist/cjs/internals/local-instance.js +3 -1
- package/dist/mjs/internals/bytecode/wasm0.js +1 -1
- package/dist/mjs/internals/bytecode/wasm1.js +1 -1
- package/dist/mjs/internals/bytecode/wasm2.js +1 -1
- package/dist/mjs/internals/local-instance.js +3 -1
- package/package.json +1 -1
|
@@ -361,8 +361,10 @@ export function startLocalInstance(config, wasmModule, eventCallback) {
|
|
|
361
361
|
peekJsonRpcResponse: (chainId) => {
|
|
362
362
|
if (!state.instance)
|
|
363
363
|
return null;
|
|
364
|
-
const mem = new Uint8Array(state.instance.exports.memory.buffer);
|
|
365
364
|
const responseInfo = state.instance.exports.json_rpc_responses_peek(chainId) >>> 0;
|
|
365
|
+
// Note that the memory must be created after calling the Wasm function, otherwise
|
|
366
|
+
// it might be invalidated if it is grown.
|
|
367
|
+
const mem = new Uint8Array(state.instance.exports.memory.buffer);
|
|
366
368
|
const ptr = buffer.readUInt32LE(mem, responseInfo) >>> 0;
|
|
367
369
|
const len = buffer.readUInt32LE(mem, responseInfo + 4) >>> 0;
|
|
368
370
|
// `len === 0` means "queue is empty" according to the API.
|