From 95eb4723e1c9c0f29fd993e629cd8b6f93596cb9 Mon Sep 17 00:00:00 2001 From: Faye Amacker <33205765+fxamacker@users.noreply.github.com> Date: Tue, 22 Oct 2024 19:41:32 -0500 Subject: [PATCH] Update CCF CDDL for IntersectionType to match codec This updates CCF-related comments using CDDL notation to make them match the CCF codec implementation. --- encoding/ccf/decode_type.go | 6 ++---- encoding/ccf/encode.go | 3 +-- encoding/ccf/encode_type.go | 3 +-- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/encoding/ccf/decode_type.go b/encoding/ccf/decode_type.go index 6d8eb3ba13..4092a48c91 100644 --- a/encoding/ccf/decode_type.go +++ b/encoding/ccf/decode_type.go @@ -610,16 +610,14 @@ func (d *Decoder) decodeReferenceType( // // ; cbor-tag-intersection-type // #6.143([ -// type: inline-type / nil, -// types: [* inline-type] +// types: [+ inline-type] // ]) // // intersection-type-value = // // ; cbor-tag-intersection-type-value // #6.191([ -// type: type-value / nil, -// types: [* type-value] +// types: [+ type-value] // ]) // // NOTE: decodeTypeFn is responsible for decoding inline-type or type-value. diff --git a/encoding/ccf/encode.go b/encoding/ccf/encode.go index 1c79c148b9..f8b9a9b4e9 100644 --- a/encoding/ccf/encode.go +++ b/encoding/ccf/encode.go @@ -1569,8 +1569,7 @@ func (e *Encoder) encodeReferenceTypeValue(typ *cadence.ReferenceType, visited c // // ; cbor-tag-intersection-type-value // #6.191([ -// type: type-value / nil, -// types: [* type-value] +// types: [+ type-value] // ]) func (e *Encoder) encodeIntersectionTypeValue(typ *cadence.IntersectionType, visited ccfTypeIDByCadenceType) error { rawTagNum := []byte{0xd8, CBORTagIntersectionTypeValue} diff --git a/encoding/ccf/encode_type.go b/encoding/ccf/encode_type.go index d952fe6e93..223c6b22df 100644 --- a/encoding/ccf/encode_type.go +++ b/encoding/ccf/encode_type.go @@ -604,8 +604,7 @@ func (e *Encoder) encodeReferenceTypeWithRawTag( // // ; cbor-tag-intersection-type // #6.143([ -// type: inline-type / nil, -// types: [* inline-type] +// types: [+ inline-type] // ]) func (e *Encoder) encodeIntersectionType(typ *cadence.IntersectionType, tids ccfTypeIDByCadenceType) error { rawTagNum := []byte{0xd8, CBORTagIntersectionType}