Skip to content

Commit

Permalink
Add ProtocolParameters::chain_switching_threshold (#1754)
Browse files Browse the repository at this point in the history
* Add ProtocolParameters::chain_switching_threshold

* Update sdk/src/types/block/protocol/mod.rs

Co-authored-by: /alex/ <[email protected]>

---------

Co-authored-by: /alex/ <[email protected]>
  • Loading branch information
thibault-martinez and Alex6323 authored Dec 6, 2023
1 parent 0738cfc commit 2b19261
Showing 1 changed file with 3 additions and 0 deletions.
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 2b19261

Please sign in to comment.