Skip to content

Commit

Permalink
Merge branch '2.0' into chore/bindings-cleanup-is-alive
Browse files Browse the repository at this point in the history
  • Loading branch information
Thoralf-M authored Dec 6, 2023
2 parents 17a293a + 2b19261 commit e74505a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions sdk/src/client/api/block_builder/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ impl ClientInner {
pub async fn build_basic_block(&self, issuer_id: AccountId, payload: Option<Payload>) -> Result<UnsignedBlock> {
let issuance = self.get_issuance().await?;

// TODO https://github.com/iotaledger/iota-sdk/issues/1753
let issuing_time = {
#[cfg(feature = "std")]
let issuing_time = std::time::SystemTime::now()
Expand Down
3 changes: 3 additions & 0 deletions sdk/src/types/api/core.rs
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,9 @@ pub struct IssuanceBlockHeaderResponse {
/// Blocks that are directly referenced to adjust opinion.
#[serde(default, skip_serializing_if = "BTreeSet::is_empty")]
pub shallow_like_parents: BTreeSet<BlockId>,
// Latest issuing time of the returned parents.
#[serde(with = "string")]
pub latest_parent_block_issuing_time: u64,
/// The slot index of the latest finalized slot.
pub latest_finalized_slot: SlotIndex,
/// The latest slot commitment.
Expand Down
3 changes: 3 additions & 0 deletions sdk/src/types/block/protocol/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ pub struct ProtocolParameters {
/// Defines the target size of the committee. If there's fewer candidates the actual committee size could be
/// smaller in a given epoch.
pub(crate) target_committee_size: u8,
/// Defines the number of heavier slots that a chain needs to be ahead of the current chain to be considered for switching.
pub(crate) chain_switching_threshold: u8,
}

// This implementation is required to make [`ProtocolParameters`] a [`Packable`] visitor.
Expand Down Expand Up @@ -128,6 +130,7 @@ impl Default for ProtocolParameters {
version_signaling_parameters: Default::default(),
rewards_parameters: Default::default(),
target_committee_size: 32,
chain_switching_threshold: 3,
}
}
}
Expand Down

0 comments on commit e74505a

Please sign in to comment.