Skip to content
Snippets Groups Projects
Unverified Commit f8feebc1 authored by girazoki's avatar girazoki Committed by GitHub
Browse files

Reinitialize should allow to override existing config in collationGeneration (#4833)


Currently the `Initialize` and `Reinitialize` messages in the
collationGeneration subsystem fail if:
-  `Initialize` if there exists already another configuration and
- `Reinitialize` if another configuration does not exist

I propose to instead change the behaviour of `Reinitialize` to always
set the config regardless of whether one exists or not.

---------

Co-authored-by: default avatarBastian Köcher <git@kchr.de>
Co-authored-by: default avatarAndrei Sandu <54316454+sandreim@users.noreply.github.com>
parent 25a648d2
No related merge requests found
Pipeline #482116 waiting for manual action with stages
in 1 hour, 15 minutes, and 32 seconds
......@@ -147,11 +147,7 @@ impl CollationGenerationSubsystem {
Ok(FromOrchestra::Communication {
msg: CollationGenerationMessage::Reinitialize(config),
}) => {
if self.config.is_none() {
gum::error!(target: LOG_TARGET, "no initial initialization");
} else {
self.config = Some(Arc::new(config));
}
self.config = Some(Arc::new(config));
false
},
Ok(FromOrchestra::Communication {
......
title: "Reinitialize should allow to override existing config in collationGeneration"
doc:
- audience: Node Dev
description: |
The Reinitialize collationGeneration subsystem message currently fails if no other config is already set.
As it is difficult to query the collationGeneration subsystem to check when to call Initialize or Reinitialize, this PR
proposes that Reinitialize overrides the configuration regardless if there was one already set.
crates:
- name: polkadot-node-collation-generation
bump: minor
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment