]> git.codecow.com Git - libnemo.git/commitdiff
Rename block pool for clarity.
authorChris Duncan <chris@zoso.dev>
Fri, 4 Jul 2025 08:11:53 +0000 (01:11 -0700)
committerChris Duncan <chris@zoso.dev>
Fri, 4 Jul 2025 08:11:53 +0000 (01:11 -0700)
src/lib/block.ts

index 997f930eded8ccd7adf7325e85c77b101bcb0927..563f78f870638d7a179dcf997267cd85d6ce3e29 100644 (file)
@@ -16,7 +16,7 @@ import { NanoNaCl, NanoNaClWorker } from '#workers'
 * of three derived classes: SendBlock, ReceiveBlock, ChangeBlock.
 */
 abstract class Block {
-       static #pool: Pool
+       static #poolNanoNaCl: Pool
        account: Account
        type: string = 'state'
        abstract subtype: 'send' | 'receive' | 'change'
@@ -38,7 +38,7 @@ abstract class Block {
                } else {
                        throw new TypeError('Invalid account')
                }
-               Block.#pool ??= new Pool(NanoNaClWorker)
+               Block.#poolNanoNaCl ??= new Pool(NanoNaClWorker)
        }
 
        /**
@@ -141,7 +141,7 @@ abstract class Block {
                        }
                        const account = await Account.fromPrivateKey(key)
                        try {
-                               const result = (await Block.#pool.assign({
+                               const result = (await Block.#poolNanoNaCl.assign({
                                        method: 'detached',
                                        msg: hex.toArray(this.hash),
                                        privateKey: hex.toArray(`${account.privateKey}`)