This repository was archived by the owner on Nov 15, 2023. It is now read-only.
configuration: refactor configuration initialization#4569
Merged
paritytech-processbot[bot] merged 1 commit intomasterfrom Dec 22, 2021
Merged
configuration: refactor configuration initialization#4569paritytech-processbot[bot] merged 1 commit intomasterfrom
paritytech-processbot[bot] merged 1 commit intomasterfrom
Conversation
Contributor
Author
|
Current dependencies on/for this PR:
This comment was auto-generated by Graphite. |
d55fbfb to
0b33c5b
Compare
4e47095 to
1e40691
Compare
0b33c5b to
35a806b
Compare
eskimor
approved these changes
Dec 21, 2021
| /// be the same. | ||
| pub(crate) fn initializer_on_new_session( | ||
| session_index: &SessionIndex, | ||
| ) -> (HostConfiguration<T::BlockNumber>, HostConfiguration<T::BlockNumber>) { |
Member
There was a problem hiding this comment.
We could make errors way less likely here if we returned a struct with members: old, new or something. A tuple with two identically typed values feels quite error prone.
35a806b to
848aa04
Compare
This was referenced Dec 22, 2021
Refactor the configuration module's initializer_on_new_session in such a way that it returns the configuration. This would make it inline with other special initialization routines like `shared`'s or `paras`. This will be useful in a following PR that will check consistency of the configuration before setting it.
848aa04 to
8937a58
Compare
1 task
ordian
approved these changes
Dec 22, 2021
|
bot merge |
|
Waiting for commit status. |
drahnr
pushed a commit
that referenced
this pull request
Jan 4, 2022
Refactor the configuration module's initializer_on_new_session in such a way that it returns the configuration. This would make it inline with other special initialization routines like `shared`'s or `paras`. This will be useful in a following PR that will check consistency of the configuration before setting it.
Wizdave97
pushed a commit
to ComposableFi/polkadot
that referenced
this pull request
Feb 3, 2022
Refactor the configuration module's initializer_on_new_session in such a way that it returns the configuration. This would make it inline with other special initialization routines like `shared`'s or `paras`. This will be useful in a following PR that will check consistency of the configuration before setting it.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refactor the configuration module's initializer_on_new_session in such a
way that it returns the configuration. This would make it inline with
other special initialization routines like
shared's orparas.This will be useful in a following PR that will check consistency of the
configuration before setting it.