Skip to content

Commit 1808850

Browse files
authored
test(ledger): empty block cbor for shelley/allegra round-trip test (#1282)
Signed-off-by: Chris Gianelloni <[email protected]>
1 parent 772cfc4 commit 1808850

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

ledger/allegra/block_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ func TestAllegraBlock_CborRoundTrip_UsingCborEncode(t *testing.T) {
4949
if err != nil {
5050
t.Fatalf("Failed to unmarshal CBOR data into AllegraBlock: %v", err)
5151
}
52+
// Reset stored CBOR to nil
53+
block.SetCbor(nil)
5254

5355
// Re-encode using the cbor Encode function
5456
encoded, err := cbor.Encode(block)

ledger/shelley/block_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ func TestShelleyBlock_CborRoundTrip_UsingCborEncode(t *testing.T) {
4848
if err != nil {
4949
t.Fatalf("Failed to unmarshal CBOR data into ShelleyBlock: %v", err)
5050
}
51+
// Reset stored CBOR to nil
52+
block.SetCbor(nil)
5153

5254
// Re-encode using the cbor Encode function
5355
encoded, err := cbor.Encode(block)

0 commit comments

Comments
 (0)