]> git.codecow.com Git - libnemo.git/commitdiff
Fix link part of block hash.
authorChris Duncan <chris@zoso.dev>
Fri, 8 Aug 2025 01:16:40 +0000 (18:16 -0700)
committerChris Duncan <chris@zoso.dev>
Fri, 8 Aug 2025 01:16:40 +0000 (18:16 -0700)
src/lib/block.ts

index 4199f2911671fa3de906d5c7450cd35041742d7f..5912593d32d133e2159e7ba0060f10102c55581e 100644 (file)
@@ -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)