From 6f5902cdbb8268524cfef465b68afc7265b99f57 Mon Sep 17 00:00:00 2001 From: Chris Duncan Date: Tue, 6 Oct 2026 14:23:33 -0700 Subject: [PATCH] Only toggle test size when switching to or from bulk. Fix typo. --- README.md | 2 +- test/index.html | 57 +++++++++++++++++++++++++++++++++++++++---------- 2 files changed, 47 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 5a02abf..fe8cdc0 100644 --- a/README.md +++ b/README.md @@ -198,7 +198,7 @@ optimized to take advantage of SIMD parallelism using WebAssembly vector types. ## Tests -A few basic tests are availabe in the source repository under `test/`. +A few basic tests are available in the source repository under `test/`. - `index.html` is a web interface to test browser execution and compare performance with other browser-based implementations. diff --git a/test/index.html b/test/index.html index a95eb6e..bf0f33d 100644 --- a/test/index.html +++ b/test/index.html @@ -497,12 +497,14 @@ SPDX-License-Identifier: GPL-3.0-or-later const size = document.getElementById('size') const api = document.getElementById('api')?.value if (api === 'nano25519 with bulk block verification') { - bytes.value = nano25519.constants.BLOCKHASH_BYTELENGTH - bytes.disabled = true - size.value = nano25519.constants.MAX_VERIFY_BLOCKS - size.dataset.value = 1 - size.disabled = true - } else { + if (!size.disabled) { + bytes.value = nano25519.constants.BLOCKHASH_BYTELENGTH + bytes.disabled = true + size.value = nano25519.constants.MAX_VERIFY_BLOCKS + size.dataset.value = 1 + size.disabled = true + } + } else if (size.disabled) { bytes.disabled = false size.value = 100 size.dataset.value = 0 @@ -542,11 +544,44 @@ SPDX-License-Identifier: GPL-3.0-or-later document.getElementById('btnStartTest').addEventListener('click', startTest) -- 2.52.0