Skip to content

Commit

Permalink
Add rent to protocol parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
thibault-martinez committed Jun 22, 2022
1 parent 56df268 commit ba95ae8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion bee-block/src/output/rent.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ impl RentStructureBuilder {
}

/// Specifies the current parameters for the byte cost computation.
#[derive(Clone)]
#[derive(Clone, Debug, Eq, PartialEq, Ord, PartialOrd)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
pub struct RentStructure {
/// Cost in tokens per virtual byte.
pub v_byte_cost: u32,
Expand Down
4 changes: 3 additions & 1 deletion bee-block/src/protocol.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

use packable::{prefix::StringPrefix, Packable};

use crate::Error;
use crate::{output::RentStructure, Error};

///
#[derive(Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Packable)]
Expand All @@ -22,6 +22,8 @@ pub struct ProtocolParemeters {
min_pow_score: u32,
/// The below max depth parameter.
below_max_depth: u8,
/// The rent structure used by given node/network.
rent_structure: RentStructure,
/// The token supply.
token_supply: u64,
}

0 comments on commit ba95ae8

Please sign in to comment.