diff --git a/sdk/src/types/block/payload/candidacy_announcement.rs b/sdk/src/types/block/payload/candidacy_announcement.rs index b21916515b..87313d9bd2 100644 --- a/sdk/src/types/block/payload/candidacy_announcement.rs +++ b/sdk/src/types/block/payload/candidacy_announcement.rs @@ -8,6 +8,6 @@ use packable::Packable; pub struct CandidacyAnnouncementPayload; impl CandidacyAnnouncementPayload { - /// The payload kind of a [`CandidacyAnnouncementPayload`]. + /// The [`Payload`](crate::types::block::payload::Payload) kind of a [`CandidacyAnnouncementPayload`]. pub const KIND: u8 = 2; } diff --git a/sdk/src/types/block/payload/signed_transaction/mod.rs b/sdk/src/types/block/payload/signed_transaction/mod.rs index 5721d70afd..a7cdc0a510 100644 --- a/sdk/src/types/block/payload/signed_transaction/mod.rs +++ b/sdk/src/types/block/payload/signed_transaction/mod.rs @@ -23,7 +23,7 @@ pub struct SignedTransactionPayload { } impl SignedTransactionPayload { - /// The payload kind of a [`SignedTransactionPayload`]. + /// The [`Payload`](crate::types::block::payload::Payload) kind of a [`SignedTransactionPayload`]. pub const KIND: u8 = 1; /// Creates a new [`SignedTransactionPayload`]. diff --git a/sdk/src/types/block/payload/tagged_data/mod.rs b/sdk/src/types/block/payload/tagged_data.rs similarity index 87% rename from sdk/src/types/block/payload/tagged_data/mod.rs rename to sdk/src/types/block/payload/tagged_data.rs index 4eccdae458..71a93a9a26 100644 --- a/sdk/src/types/block/payload/tagged_data/mod.rs +++ b/sdk/src/types/block/payload/tagged_data.rs @@ -12,7 +12,7 @@ use packable::{ Packable, }; -use crate::types::block::{Block, Error}; +use crate::types::block::Error; pub(crate) type TagLength = BoundedU8<{ *TaggedDataPayload::TAG_LENGTH_RANGE.start() }, { *TaggedDataPayload::TAG_LENGTH_RANGE.end() }>; @@ -30,15 +30,12 @@ pub struct TaggedDataPayload { } impl TaggedDataPayload { - /// The payload kind of a [`TaggedDataPayload`]. + /// The [`Payload`](crate::types::block::payload::Payload) kind of a [`TaggedDataPayload`]. pub const KIND: u8 = 0; - /// Valid lengths for the tag. + /// Valid length range for the tag. pub const TAG_LENGTH_RANGE: RangeInclusive = 0..=64; - /// Valid lengths for the data. - // Less than max block length, because of the other fields in the block and payload kind, tagged payload field - // lengths. - // TODO https://github.com/iotaledger/iota-sdk/issues/1226 - pub const DATA_LENGTH_RANGE: RangeInclusive = 0..=(Block::LENGTH_MAX - Block::LENGTH_MIN - 9) as u32; + /// Valid length range for the data. + pub const DATA_LENGTH_RANGE: RangeInclusive = 0..=8192; /// Creates a new [`TaggedDataPayload`]. pub fn new(tag: impl Into>, data: impl Into>) -> Result {