From b4fba20a7c1a8658f910b9c1884c24bb0d21700c Mon Sep 17 00:00:00 2001 From: Andrew Gaffney Date: Sun, 23 Apr 2023 17:04:07 -0500 Subject: [PATCH] fix: use correct prefix values for Byron block hash Fixes #230 --- ledger/byron.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ledger/byron.go b/ledger/byron.go index 567aec37..6633f64e 100644 --- a/ledger/byron.go +++ b/ledger/byron.go @@ -66,7 +66,7 @@ func (h *ByronMainBlockHeader) Hash() string { // Prepend bytes for CBOR list wrapper // The block hash is calculated with these extra bytes, so we have to add them to // get the correct value - h.hash = generateBlockHeaderHash(h.Cbor(), []byte{0x82, BLOCK_TYPE_BYRON_EBB}) + h.hash = generateBlockHeaderHash(h.Cbor(), []byte{0x82, BLOCK_TYPE_BYRON_MAIN}) } return h.hash } @@ -125,7 +125,7 @@ func (h *ByronEpochBoundaryBlockHeader) Hash() string { // Prepend bytes for CBOR list wrapper // The block hash is calculated with these extra bytes, so we have to add them to // get the correct value - h.hash = generateBlockHeaderHash(h.Cbor(), []byte{0x82, BLOCK_TYPE_BYRON_MAIN}) + h.hash = generateBlockHeaderHash(h.Cbor(), []byte{0x82, BLOCK_TYPE_BYRON_EBB}) } return h.hash }