Skip to content
Snippets Groups Projects
Sergei Shulepov's avatar
Sergey Pepyakin authored
This commit refactors the consistency checks. Instead of each individual
setter performs its checks locally, we delegate those checks to the
already existing function `check_consistency`. This removes duplication
and simplifies the logic.

A motivating example of this one is the next PR in the stack that will
introduce a check for a field, which validity depends on the validity of
other two fields. Without this refactoring we will have to place a check
not only to the field in question, but also to the other two fields so
that if they are changed they do not violate consistency criteria. It's
easy to imagine how this can go unwieldy with the number of checks.

This also adds a test that verifies that the default chain spec host
configuration is consistent.
4d768787
Name Last commit Last update
polkadot