]> git.codecow.com Git - nano25519.git/commitdiff
Pass max blocks dynamically.
authorChris Duncan <chris@codecow.com>
Thu, 27 Aug 2026 04:52:28 +0000 (21:52 -0700)
committerChris Duncan <chris@codecow.com>
Thu, 27 Aug 2026 04:52:28 +0000 (21:52 -0700)
src/lib/verify.ts

index 356fee55924fa7e83cf4d6f7e39483b5bbac32dc..0ef454cc4b3e6b31eab1e8cd479fa93fdfc15da8 100644 (file)
@@ -34,7 +34,7 @@ export function verify_blocks (pub: unknown, data: unknown): boolean[] {
                throw new RangeError('Must pass at least one block', { cause: data })
        }
        if (OUT_BUF_LEN < count) {
-               throw new RangeError('Bulk Nano block verification must be no more than 256 blocks', { cause: count })
+               throw new RangeError(`Bulk Nano block verification must be no more than ${OUT_BUF_LEN} blocks`, { cause: count })
        }
        const verified = new Uint8Array(count)
        let buffer = new Uint8Array(exports.memory.buffer)