From: Chris Duncan Date: Fri, 8 Aug 2025 19:08:13 +0000 (-0700) Subject: Fix pow check when processing block. X-Git-Tag: v0.10.5~43^2~11 X-Git-Url: https://git.codecow.com/?a=commitdiff_plain;h=46f325e19c07cb480121688c86848462ce8d4d14;p=libnemo.git Fix pow check when processing block. --- 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,