From: Chris Duncan Date: Sat, 23 May 2026 05:50:58 +0000 (-0700) Subject: Fix endianness. X-Git-Url: https://git.codecow.com/?a=commitdiff_plain;h=1d3541ca06707b4346638d6b2e34fba630bc3b96;p=nano-pow.git Fix endianness. --- 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) } }