From: Chris Duncan Date: Fri, 8 Aug 2025 01:16:40 +0000 (-0700) Subject: Fix link part of block hash. X-Git-Tag: v0.10.5~43^2~45 X-Git-Url: https://git.codecow.com/?a=commitdiff_plain;h=7e6c9d79e4cd0a5fbae0d4874365296b78cbcc56;p=libnemo.git Fix link part of block hash. --- diff --git a/src/lib/block.ts b/src/lib/block.ts index 4199f29..5912593 100644 --- a/src/lib/block.ts +++ b/src/lib/block.ts @@ -137,10 +137,10 @@ export class Block { this.previous.padStart(64, '0'), this.representative.publicKey, dec.toHex(this.balance, 32), - ...this.link + this.link ] const hash = new Blake2b(32) - data.forEach(d => typeof d === 'string' ? hash.update(hex.toBytes(d)) : d) + data.forEach(d => typeof d === 'string' ? hash.update(hex.toBytes(d)) : hash.update(d)) return format === 'hex' ? hash.digest(format) : hash.digest() } catch (err) { console.error(err)