]> zoso.dev Git - libnemo.git/commitdiff
Pow is working and timing is definitely due to gl.readPixels due to it stalling the...
authorChris Duncan <chris@zoso.dev>
Tue, 10 Dec 2024 22:14:52 +0000 (14:14 -0800)
committerChris Duncan <chris@zoso.dev>
Tue, 10 Dec 2024 22:14:52 +0000 (14:14 -0800)
src/lib/block.ts

index 5f919c195401475c65d89923c44082dc5f007d0f..26c8364d19f8f8e750e0065223e51411151c8a6f 100644 (file)
@@ -83,10 +83,9 @@ abstract class Block {
        async pow (): Promise<void> {
                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