From 857cbf8c341aeb0d4dfd68588cafeabe989e7451 Mon Sep 17 00:00:00 2001 From: Casey Rodarmor Date: Mon, 25 Dec 2023 08:55:20 -0800 Subject: [PATCH 1/2] Make inscriptions with tag 66 permanently unbound --- src/envelope.rs | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/src/envelope.rs b/src/envelope.rs index 427757dba7..d2427f4891 100644 --- a/src/envelope.rs +++ b/src/envelope.rs @@ -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]; @@ -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!( From 5b6893b310b14a1d73a97046affc2030226b83f7 Mon Sep 17 00:00:00 2001 From: Casey Rodarmor Date: Mon, 25 Dec 2023 11:22:55 -0800 Subject: [PATCH 2/2] Placate clippy --- src/envelope.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/envelope.rs b/src/envelope.rs index d2427f4891..01d37108e3 100644 --- a/src/envelope.rs +++ b/src/envelope.rs @@ -15,6 +15,7 @@ pub(crate) const PROTOCOL_ID: [u8; 3] = *b"ord"; pub(crate) const BODY_TAG: [u8; 0] = []; 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];