From 1d3541ca06707b4346638d6b2e34fba630bc3b96 Mon Sep 17 00:00:00 2001 From: Chris Duncan Date: Fri, 22 May 2026 22:50:58 -0700 Subject: [PATCH] Fix endianness. --- src/lib/validate/index.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib/validate/index.ts b/src/lib/validate/index.ts index d777214..d99321e 100644 --- a/src/lib/validate/index.ts +++ b/src/lib/validate/index.ts @@ -1,7 +1,7 @@ //! SPDX-FileCopyrightText: 2025 Chris Duncan //! SPDX-License-Identifier: GPL-3.0-or-later -import { bigintToHex, BytesToHex, Logger, RECEIVE, SEND } from '#utils' +import { BytesToHex, Logger, RECEIVE, SEND, bigintToHex } from '#utils' import { WorkValidateResponse } from 'nano-pow' const logger = new Logger() @@ -79,9 +79,9 @@ function init (seed: BigUint64Array, hash: BigUint64Array): void { v[14] = ~v[14] // Compression // Set up input buffers - mView.setBigUint64(0, seed[0], true) + mView.setBigUint64(0, seed[0]) for (let i = 0; i < 4; i++) { - mView.setBigUint64(8 * (i + 1), hash[i]) + mView.setBigUint64(8 * (i + 1), hash[i], true) } } -- 2.52.0