This repository was archived by the owner on Nov 15, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Service's Configuration has optional fields that shouldn't be optional #4776
Copy link
Copy link
Closed
Labels
I7-refactorCode needs refactoring.Code needs refactoring.J0-enhancementAn additional feature request.An additional feature request.Z2-mediumCan be fixed by a coder with good Rust knowledge but little knowledge of the codebase.Can be fixed by a coder with good Rust knowledge but little knowledge of the codebase.
Milestone
Description
Following the discussion on: https://github.com/paritytech/substrate/pull/4692/files/bea809d4c14a2ede953227ac885e3b3f9771c548#r372049016
There are 2 conflicting things we would like to have:
- Running a node requires a Configuration and some of the fields are not optional but they are defined as Option
- We should be able to define defaults to the Configuration before the command line get parsed. Therefore some of the fields need to be Option
The idea is to be able to make a Configuration before it being modified by the commandline arguments. For that I need defaults and chain_spec, like some other fields, are Option even though they are required for running a node.
It's not ideal. I think it would be best to have some kind of intermediate object, one that has the Options that can be converted to one that doesn't have and it would be fail-able at that point.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
I7-refactorCode needs refactoring.Code needs refactoring.J0-enhancementAn additional feature request.An additional feature request.Z2-mediumCan be fixed by a coder with good Rust knowledge but little knowledge of the codebase.Can be fixed by a coder with good Rust knowledge but little knowledge of the codebase.