Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make inscriptions with tag 66 permanently unbound #2906

Merged
merged 3 commits into from
Dec 25, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 18 additions & 1 deletion src/envelope.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,11 @@ use {
pub(crate) const PROTOCOL_ID: [u8; 3] = *b"ord";

pub(crate) const BODY_TAG: [u8; 0] = [];
pub(crate) const CONTENT_TYPE_TAG: [u8; 1] = [1];
pub(crate) const POINTER_TAG: [u8; 1] = [2];
#[allow(unused)]
pub(crate) const UNBOUND_TAG: [u8; 1] = [66];

pub(crate) const CONTENT_TYPE_TAG: [u8; 1] = [1];
pub(crate) const PARENT_TAG: [u8; 1] = [3];
pub(crate) const METADATA_TAG: [u8; 1] = [5];
pub(crate) const METAPROTOCOL_TAG: [u8; 1] = [7];
Expand Down Expand Up @@ -834,6 +837,20 @@ mod tests {
);
}

#[test]
fn tag_66_makes_inscriptions_unbound() {
assert_eq!(
parse(&[envelope(&[b"ord", &UNBOUND_TAG, &[1]])]),
vec![ParsedEnvelope {
payload: Inscription {
unrecognized_even_field: true,
..Default::default()
},
..Default::default()
}],
);
}

#[test]
fn incomplete_field() {
assert_eq!(
Expand Down
Loading