From a5c2d11ee0f2b6a4f90250573c5c71124023c916 Mon Sep 17 00:00:00 2001 From: Thibault Martinez Date: Wed, 6 Dec 2023 11:49:03 +0100 Subject: [PATCH 1/2] Add ProtocolParameters::chain_switching_threshold --- sdk/src/types/block/protocol/mod.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sdk/src/types/block/protocol/mod.rs b/sdk/src/types/block/protocol/mod.rs index e4e2adaeb0..21846dc733 100644 --- a/sdk/src/types/block/protocol/mod.rs +++ b/sdk/src/types/block/protocol/mod.rs @@ -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. @@ -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, } } } From 1f47d57e2b4aa189f530705c881f39122776c02c Mon Sep 17 00:00:00 2001 From: Thibault Martinez Date: Wed, 6 Dec 2023 15:11:27 +0100 Subject: [PATCH 2/2] Update sdk/src/types/block/protocol/mod.rs Co-authored-by: /alex/ --- sdk/src/types/block/protocol/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/src/types/block/protocol/mod.rs b/sdk/src/types/block/protocol/mod.rs index 21846dc733..2c200bc596 100644 --- a/sdk/src/types/block/protocol/mod.rs +++ b/sdk/src/types/block/protocol/mod.rs @@ -91,7 +91,7 @@ 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. + /// 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, }