From 0f8fd13c6e6b9c79a5e6b60badf8e1b07594de39 Mon Sep 17 00:00:00 2001 From: Chris Duncan Date: Tue, 10 Dec 2024 14:14:52 -0800 Subject: [PATCH] Pow is working and timing is definitely due to gl.readPixels due to it stalling the pipeline, so perhaps we can get some performance out of that. --- src/lib/block.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/lib/block.ts b/src/lib/block.ts index 5f919c1..26c8364 100644 --- a/src/lib/block.ts +++ b/src/lib/block.ts @@ -83,10 +83,9 @@ abstract class Block { async pow (): Promise { const data = { "hash": this.previous, - "threshold": '0xf' - // (this instanceof SendBlock || this instanceof ChangeBlock) - // ? THRESHOLD_SEND - // : THRESHOLD_RECEIVE + "threshold": (this instanceof SendBlock || this instanceof ChangeBlock) + ? THRESHOLD_SEND + : THRESHOLD_RECEIVE } const [{ work }] = await Pool.work('converge', 'pow', [data]) this.work = work -- 2.34.1