Skip to content

Commit

Permalink
Make inscriptions with tag 66 permanently unbound (ordinals#2906)
Browse files Browse the repository at this point in the history
  • Loading branch information
casey authored and torkelrogstad committed Mar 11, 2024
1 parent 40c5415 commit 26e21b7
Showing 1 changed file with 18 additions and 1 deletion.
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

0 comments on commit 26e21b7

Please sign in to comment.