From: Chris Duncan Date: Wed, 6 Aug 2025 04:06:00 +0000 (-0700) Subject: Return block from pow to enable call chain. X-Git-Tag: v0.10.5~43^2~77 X-Git-Url: https://git.codecow.com/?a=commitdiff_plain;h=1c297ea3a12441f0252c5c519fea234d38cd6310;p=libnemo.git Return block from pow to enable call chain. --- diff --git a/src/lib/block.ts b/src/lib/block.ts index e4e8a6d..5148f5a 100644 --- a/src/lib/block.ts +++ b/src/lib/block.ts @@ -133,7 +133,7 @@ abstract class Block { * * A successful response sets the `work` property. */ - async pow (): Promise { + async pow (): Promise { const difficulty: bigint = (this instanceof SendBlock || this instanceof ChangeBlock) ? DIFFICULTY_SEND : DIFFICULTY_RECEIVE @@ -149,6 +149,7 @@ abstract class Block { throw new Error('Wwork generated is invalid', { cause: `${check.difficulty} < ${difficulty}` }) } this.work = result.work + return this } /**