Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/wrong startup logic #3882

Merged
merged 3 commits into from
Mar 16, 2022
Merged

Fix/wrong startup logic #3882

merged 3 commits into from
Mar 16, 2022

Conversation

kjazgar
Copy link
Contributor

@kjazgar kjazgar commented Mar 16, 2022

Fixes | Closes | Resolves #

Resolves #3771.

Changes:

Divided StartBlockProducer into two classes.

Types of changes

What types of changes does your code introduce?
Put an x in the boxes that apply

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation Update
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Other (please describe):

Testing

Requires testing

  • Yes
  • No

Comment on lines 46 to 47
if (_api.BlockProducer == null) throw new StepDependencyException(nameof(_api.BlockProducer));
if (_api.BlockTree == null) throw new StepDependencyException(nameof(_api.BlockTree));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move those to StartBlockProducer

if (consensusPlugin is not null)
{
foreach (IConsensusWrapperPlugin wrapperPlugin in _api.GetConsensusWrapperPlugins())
if (_api.BlockProducer != null && _api.BlockTree != null)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move StepDependencyExceptions here instead of this if

@LukaszRozmej LukaszRozmej merged commit fb2a395 into master Mar 16, 2022
@LukaszRozmej LukaszRozmej deleted the fix/wrong_startup_logic branch March 16, 2022 11:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Wrong startup logic - could break HealthChecks plugin
2 participants