From 46f325e19c07cb480121688c86848462ce8d4d14 Mon Sep 17 00:00:00 2001 From: Chris Duncan Date: Fri, 8 Aug 2025 12:08:13 -0700 Subject: [PATCH] Fix pow check when processing block. --- src/lib/block.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib/block.ts b/src/lib/block.ts index 8a2d342..32ce1c3 100644 --- a/src/lib/block.ts +++ b/src/lib/block.ts @@ -263,11 +263,11 @@ export class Block { */ async process (rpc: Rpc): Promise { Block.#validate(this) - if (!this.signature) { + if (this.signature == null) { throw new Error('Block is missing signature. Use sign() and try again.') } - if (!this.work == null) { - throw new Error('Block is missing proof-of-work. Generate PoW and try again.') + if (this.work == null) { + throw new Error('Block is missing proof-of-work. Use pow() and try again.') } const data = { "subtype": this.subtype, -- 2.47.3