]> zoso.dev Git - libnemo.git/commitdiff
Point block pow to PowGpu for testing.
authorChris Duncan <chris@zoso.dev>
Tue, 31 Dec 2024 22:36:56 +0000 (14:36 -0800)
committerChris Duncan <chris@zoso.dev>
Tue, 31 Dec 2024 22:36:56 +0000 (14:36 -0800)
src/lib/block.ts

index 83b4cdd346f8508fbe4f5d90481a9a0b050d0af1..ac36f398df437182dab502801d4139644cf81513 100644 (file)
@@ -16,7 +16,7 @@ import { Pow, PowGpu } from './workers.js'
 * of three derived classes: SendBlock, ReceiveBlock, ChangeBlock.
 */
 abstract class Block {
-       static #pool: Pool = new Pool(Pow)
+       static #pool: Pool = new Pool(PowGpu)
        account: Account
        type: string = 'state'
        abstract subtype: 'send' | 'receive' | 'change'
@@ -86,7 +86,8 @@ abstract class Block {
                const data = {
                        "hash": this.previous,
                        "threshold": (this instanceof SendBlock || this instanceof ChangeBlock)
-                               ? THRESHOLD_SEND
+                               // ? THRESHOLD_SEND
+                               ? 0
                                : THRESHOLD_RECEIVE
                }
                const [{ work }] = await Block.#pool.assign([data])