From: Chris Duncan Date: Thu, 7 Aug 2025 16:50:31 +0000 (-0700) Subject: Use zero public key instead of importing an entire account. X-Git-Tag: v0.10.5~43^2~58 X-Git-Url: https://git.codecow.com/?a=commitdiff_plain;h=1d41f57a31ff5c3a11dd629cf2957382375f8bbe;p=libnemo.git Use zero public key instead of importing an entire account. --- diff --git a/src/lib/block.ts b/src/lib/block.ts index b2b6741..45de7a3 100644 --- a/src/lib/block.ts +++ b/src/lib/block.ts @@ -4,7 +4,7 @@ import { NanoPow } from 'nano-pow' import { Account } from './account' import { Blake2b } from './blake2b' -import { BURN_ADDRESS, PREAMBLE, DIFFICULTY_RECEIVE, DIFFICULTY_SEND } from './constants' +import { BURN_PUBLIC_KEY, PREAMBLE, DIFFICULTY_RECEIVE, DIFFICULTY_SEND, UNITS } from './constants' import { bytes, dec, hex } from './convert' import { NanoNaCl } from './nano-nacl' import { Rpc } from './rpc' @@ -176,7 +176,8 @@ export class Block { } try { this.subtype = 'change' - this.link = hex.toBytes(Account.import(BURN_ADDRESS).publicKey) + this.link = hex.toBytes(BURN_PUBLIC_KEY) + return this } catch (err) { this.subtype = undefined