If cfg has Merge.Enabled = false a null ref is thrown in startup
Fixes Closes Resolves #
I did not create an issue. It is a very small bug fix.
Changes
- List the changes
Types of changes
What types of changes does your code introduce?
- [x] Bugfix (a non-breaking change that fixes an issue)
- [ ] New feature (a non-breaking change that adds functionality)
- [ ] Breaking change (a change that causes existing functionality not to work as expected)
- [ ] Optimization
- [ ] Refactoring
- [ ] Documentation update
- [ ] Build-related changes
- [ ] Other: Description
Testing
Requires testing
- [ ] Yes
- [x] No
If yes, did you write tests?
- [ ] Yes
- [x] No
Notes on testing
Optional. Remove if not applicable.
Documentation
Requires documentation update
- [ ] Yes
- [x] No
If yes, link the PR to the docs update or the issue with the details labeled docs. Remove if not applicable.
Requires explanation in Release Notes
- [ ] Yes
- [x] No
If yes, fill in the details here. Remove if not applicable.
Remarks
Optional. Remove if not applicable.
Nice catch, but maybe if TerminalTotalDifficulty is set we should just force enable MergePlugin? @MarekM25 WDYT?
Nice catch, but maybe if
TerminalTotalDifficultyis set we should just force enable MergePlugin? @MarekM25 WDYT?
Yes, something like that. Funny - I've just written similar comment.
Nice catch, but maybe if
TerminalTotalDifficultyis set we should just force enable MergePlugin? @MarekM25 WDYT?Yes, something like that. Funny - I've just written similar comment.
@MarekM25 The Merge flag is mostly used for initializing plugins. So i guess the options are:
- throw in cfg validation if Merge = false && TerminalTotalDifficulty != null
- set Merge=true in cfg startup if TerminalTotalDifficulty != null
- only check on merge flag when init CLHealthChecker
Nice catch, but maybe if
TerminalTotalDifficultyis set we should just force enable MergePlugin? @MarekM25 WDYT?Yes, something like that. Funny - I've just written similar comment.
@MarekM25 The Merge flag is mostly used for initializing plugins. So i guess the options are:
* throw in cfg validation if Merge = false && TerminalTotalDifficulty != null * set Merge=true in cfg startup if TerminalTotalDifficulty != null * only check on merge flag when init CLHealthChecker
I would do 1. or consider 2. @MarekM25 ?
Nice catch, but maybe if
TerminalTotalDifficultyis set we should just force enable MergePlugin? @MarekM25 WDYT?Yes, something like that. Funny - I've just written similar comment.
@MarekM25 The Merge flag is mostly used for initializing plugins. So i guess the options are:
* throw in cfg validation if Merge = false && TerminalTotalDifficulty != null * set Merge=true in cfg startup if TerminalTotalDifficulty != null * only check on merge flag when init CLHealthCheckerI would do 1. or consider 2. @MarekM25 ?
IMO, both options 1 and 2 are okay.
@LukaszRozmej @MarekM25 the merge plugin willl now throw if TerminalTotalDifficulty is set and merge == false