Skip to content

Commit

Permalink
Make inscriptions with tag 66 permanently unbound
Browse files Browse the repository at this point in the history
  • Loading branch information
casey committed Dec 25, 2023
1 parent d856b05 commit 1f4cb3a
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion src/envelope.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@ 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];
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 +836,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

0 comments on commit 1f4cb3a

Please sign in to comment.