Skip to content
Snippets Groups Projects
  • Cecile Tonglet's avatar
    Add tests & Service's Configuration has optional fields that shouldn't be optional (#4842) · e8000e74
    Cecile Tonglet authored
    Related to #4776 
    Related to https://github.com/paritytech/polkadot/pull/832
    
    To summarize the changes:
    1. I did not manage to validate with types the service's Configuration. But I did reduce the possibility of errors by moving all the "fill" functions to their respective structopts
    2. I split params.rs to multiple modules: one module params for just CLI parameters and one module commands for CLI subcommands (and RunCmd). Every command and params are in their own file so things are grouped better together and easier to remove
    3. I removed the run and run_subcommand helpers as they are not helping much anymore. Running a command is always a set of 3 commands: 1. init 2. update config 3. run. This still allow the user to change the config before arguments get parsed or right after.
    4. I added tests for all subcommands.
    5. [deleted]
    
    Overall the aim is to improve the situation with the Configuration and the optional parameters, add tests, make the API more consistent and simpler.
    e8000e74
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
Cargo.lock 194.85 KiB