From: Chris Duncan Date: Thu, 24 Apr 2025 22:08:53 +0000 (-0700) Subject: Update private function name for consistency. X-Git-Url: https://zoso.dev/?a=commitdiff_plain;h=2cd72d342992584b8936e782bc982dfdf8e9d735;p=nano-pow.git Update private function name for consistency. --- diff --git a/src/lib/gpu/index.ts b/src/lib/gpu/index.ts index 314783e..ebe35ad 100644 --- a/src/lib/gpu/index.ts +++ b/src/lib/gpu/index.ts @@ -204,7 +204,7 @@ export class NanoPowGpu { return { difficulty, effort } } - static async #dispatch (pipeline: GPUComputePipeline, seed: bigint, hash: string, difficulty: bigint, passes: number): Promise { + static async #work_dispatch (pipeline: GPUComputePipeline, seed: bigint, hash: string, difficulty: bigint, passes: number): Promise { if (this.#device == null) throw new Error(`WebGPU device failed to load.`) // Set up uniform buffer object // Note: u32 size is 4, but total alignment must be multiple of 16 @@ -273,7 +273,7 @@ export class NanoPowGpu { random = BigInt(Math.floor(Math.random() * 0xffffffff)) seed = (seed & 0xffffffffn) << 32n | random if (this.#debug) console.log('seed', seed.toString(16).padStart(16, '0')) - await this.#dispatch(this.#searchPipeline, seed, hash, difficulty, effort) + await this.#work_dispatch(this.#searchPipeline, seed, hash, difficulty, effort) const found = !!this.#resultView.getUint32(0) nonce = this.#resultView.getBigUint64(8, true) result = this.#resultView.getBigUint64(16, true) @@ -308,7 +308,7 @@ export class NanoPowGpu { const seed = BigInt(`0x${work}`) if (this.#debug) console.log('work', work) - await this.#dispatch(this.#validatePipeline, seed, hash, difficulty, 1) + await this.#work_dispatch(this.#validatePipeline, seed, hash, difficulty, 1) nonce = this.#resultView.getBigUint64(8, true) result = this.#resultView.getBigUint64(16, true) this.#busy = false