From 13076478968818443b9bb97425b7db09e00e2fc0 Mon Sep 17 00:00:00 2001 From: Pierre Krieger Date: Fri, 28 Jan 2022 13:25:12 +0100 Subject: [PATCH] Add attributes and documentation to fork_id (#10746) * Add attributes and documentation to fork_id * Update client/chain-spec/src/chain_spec.rs Co-authored-by: Sacha Lansky Co-authored-by: Sacha Lansky --- 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..2412a7cdf83f0 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 cases 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)]