Skip to content

Commit

Permalink
TaggedDataPayload nits
Browse files Browse the repository at this point in the history
  • Loading branch information
thibault-martinez committed Dec 18, 2023
1 parent f812132 commit 8816cc3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion sdk/src/types/block/output/storage_score.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

//! Storage deposit is a concept that creates a monetary incentive to keep the ledger state small. This is achieved by
//! enforcing a minimum IOTA coin deposit in every output based on the actually used disk space of the output itself.
//! [TIP-47: Storage Deposit Dust Protection](https://github.com/iotaledger/tips/blob/tip47/tips/TIP-0047/tip-0047.md)
//! [TIP-47: Storage Deposit Dust Protection](https://github.com/iotaledger/tips/blob/tip47/tips/TIP-0047/tip-0047.md).

use packable::Packable;

Expand Down
9 changes: 5 additions & 4 deletions sdk/src/types/block/payload/tagged_data.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
// Copyright 2020-2021 IOTA Stiftung
// SPDX-License-Identifier: Apache-2.0

//! Module describing the tagged data payload.
//! A basic payload type that allows the addition of arbitrary data.
//! [TIP-53: Tagged Data](https://github.com/iotaledger/tips/blob/tip53/tips/TIP-0053/tip-0053.md).

use alloc::boxed::Box;
use core::ops::RangeInclusive;
Expand All @@ -22,7 +23,7 @@ pub(crate) type TagLength =
pub(crate) type TaggedDataLength =
BoundedU32<{ *TaggedDataPayload::DATA_LENGTH_RANGE.start() }, { *TaggedDataPayload::DATA_LENGTH_RANGE.end() }>;

/// A payload which holds a tag and associated data.
/// A payload which holds optional data with an optional tag.
#[derive(Clone, Eq, PartialEq, Packable)]
#[packable(unpack_error = Error)]
pub struct TaggedDataPayload {
Expand All @@ -35,9 +36,9 @@ pub struct TaggedDataPayload {
impl TaggedDataPayload {
/// The [`Payload`](crate::types::block::payload::Payload) kind of a [`TaggedDataPayload`].
pub const KIND: u8 = 0;
/// Valid length range for the tag.
/// Valid tag length range.
pub const TAG_LENGTH_RANGE: RangeInclusive<u8> = 0..=64;
/// Valid length range for the data.
/// Valid data length range.
pub const DATA_LENGTH_RANGE: RangeInclusive<u32> = 0..=8192;

/// Creates a new [`TaggedDataPayload`].
Expand Down

0 comments on commit 8816cc3

Please sign in to comment.