-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add funcs to check availablility of CBOR tag nums
This commit: * Adds IsCBORTagNumberRangeAvailable() * Adds ReservedCBORTagNumberRange() * Reserves CBOR tag numbers [240, 255] for atree internal use IsCBORTagNumberRangeAvailable() checks if specified range of CBOR tag numbers can be used to encode elements managed by atree containers. ReservedCBORTagNumberRange() returns minTagNum and maxTagNum of the range of CBOR tag numbers reserved by atree. Currently, Atree and Cadence uses CBOR tag numbers: * Atree: 246 to 255 * Cadence: 128 to 230 to encode internal Cadence values This commit reserves CBOR tag numbers [240, 255] for atree internal use. Applications must use unreserved CBOR tag numbers to encode elements managed by atree containers. When a new tag number is needed, Atree will use higher tag number first from its reserved range. By contrast, Cadence will use lower tag numbers first from its own (different) reserved range. This allows Atree and Cadence more flexibility in case we need to revisit the allocation of adjacent unused ranges for Atree and Cadence.
- Loading branch information
Showing
2 changed files
with
96 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters