]> git.codecow.com Git - libnemo.git/commitdiff
Enable version spec for epochs.
authorChris Duncan <chris@codecow.com>
Sat, 8 Aug 2026 09:19:20 +0000 (02:19 -0700)
committerChris Duncan <chris@codecow.com>
Sat, 8 Aug 2026 09:19:20 +0000 (02:19 -0700)
src/lib/block/index.ts

index 04b4229504ba29d545c8e8c14812f984ee6229bd..8e8d89959db97e25066395dc45a1e39eb23e760d 100644 (file)
@@ -171,8 +171,8 @@ export class Block {
         *
         * @returns {Block} This block unchanged
         */
-       epoch (): Block {
-               const special = utf8.toHex('epoch v2 block')
+       epoch (version: 1 | 2): Block {
+               const special = utf8.toHex(`epoch v${version} block`)
                this.link = hex.toBytes(`${special}000000000000000000000000000000000000`)
                this.subtype = 'epoch'
                return this