From dedf66d13a50b5dd2a6127d423aa25bdc141069d Mon Sep 17 00:00:00 2001 From: Chris Duncan Date: Wed, 26 Aug 2026 23:48:54 -0700 Subject: [PATCH] Write verification results directly to output buffer. --- src/assembly/index.ts | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/assembly/index.ts b/src/assembly/index.ts index 77139c5..9ecb400 100644 --- a/src/assembly/index.ts +++ b/src/assembly/index.ts @@ -208,7 +208,7 @@ export function verify_blocks (count: i32): void { memory.copy(changetype(verify_blocks_sig), changetype(MESSAGE_BUFFER) + BLOCKHASH_BYTELENGTH + (96 * i), SIGNATURE_BYTELENGTH) // Verify hash and signature - verify_blocks_out[i] = u8(crypto_verify_relaxed(verify_blocks_sig, verify_blocks_msg, BLOCKHASH_BYTELENGTH, verify_blocks_pub)) + store(OUTPUT_BUFFER + i, u8(crypto_verify_relaxed(verify_blocks_sig, verify_blocks_msg, BLOCKHASH_BYTELENGTH, verify_blocks_pub)) } } @@ -216,8 +216,4 @@ export function verify_blocks (count: i32): void { MESSAGE_BUFFER.fill(0) verify_blocks_pub.fill(0) verify_blocks_sig.fill(0) - - // Clear output buffer of prior data, then copy local result to output buffer - OUTPUT_BUFFER.fill(0) - memory.copy(changetype(OUTPUT_BUFFER), changetype(verify_blocks_out), count) } -- 2.52.0