From 21c3d8b43cad387c894b46b2beb04c3fa965d06f Mon Sep 17 00:00:00 2001 From: Pierre Krieger Date: Fri, 28 Jan 2022 12:13:02 +0100 Subject: [PATCH 1/2] Add attributes and documentation to fork_id --- client/chain-spec/src/chain_spec.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/client/chain-spec/src/chain_spec.rs b/client/chain-spec/src/chain_spec.rs index a22a68d2944fa..c44927cf24d0c 100644 --- a/client/chain-spec/src/chain_spec.rs +++ b/client/chain-spec/src/chain_spec.rs @@ -164,6 +164,10 @@ struct ClientSpec { boot_nodes: Vec, telemetry_endpoints: Option, protocol_id: Option, + /// Arbitrary string. Nodes will only synchronize with other nodes that have the same value + /// in their `fork_id`. This can be used in order to segregate nodes in case when multiple + /// chains have the same genesis hash. + #[serde(default = "Default::default", skip_serializing_if = "Option::is_none")] fork_id: Option, properties: Option, #[serde(flatten)] From 9afb08262cf8339b9e3bd631430a7e532e20fda7 Mon Sep 17 00:00:00 2001 From: Pierre Krieger Date: Fri, 28 Jan 2022 12:42:51 +0100 Subject: [PATCH 2/2] Update client/chain-spec/src/chain_spec.rs Co-authored-by: Sacha Lansky --- client/chain-spec/src/chain_spec.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/chain-spec/src/chain_spec.rs b/client/chain-spec/src/chain_spec.rs index c44927cf24d0c..2412a7cdf83f0 100644 --- a/client/chain-spec/src/chain_spec.rs +++ b/client/chain-spec/src/chain_spec.rs @@ -165,7 +165,7 @@ struct ClientSpec { telemetry_endpoints: Option, protocol_id: Option, /// Arbitrary string. Nodes will only synchronize with other nodes that have the same value - /// in their `fork_id`. This can be used in order to segregate nodes in case when multiple + /// in their `fork_id`. This can be used in order to segregate nodes in cases when multiple /// chains have the same genesis hash. #[serde(default = "Default::default", skip_serializing_if = "Option::is_none")] fork_id: Option,