diff --git a/ledger/allegra/block_test.go b/ledger/allegra/block_test.go index 686264df..19ea900c 100644 --- a/ledger/allegra/block_test.go +++ b/ledger/allegra/block_test.go @@ -49,6 +49,8 @@ func TestAllegraBlock_CborRoundTrip_UsingCborEncode(t *testing.T) { if err != nil { t.Fatalf("Failed to unmarshal CBOR data into AllegraBlock: %v", err) } + // Reset stored CBOR to nil + block.SetCbor(nil) // Re-encode using the cbor Encode function encoded, err := cbor.Encode(block) diff --git a/ledger/shelley/block_test.go b/ledger/shelley/block_test.go index f122fa70..5fa645a7 100644 --- a/ledger/shelley/block_test.go +++ b/ledger/shelley/block_test.go @@ -48,6 +48,8 @@ func TestShelleyBlock_CborRoundTrip_UsingCborEncode(t *testing.T) { if err != nil { t.Fatalf("Failed to unmarshal CBOR data into ShelleyBlock: %v", err) } + // Reset stored CBOR to nil + block.SetCbor(nil) // Re-encode using the cbor Encode function encoded, err := cbor.Encode(block)