Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

pallet-staking: Reorg migration, pallet and pallet impls #9410

Merged
10 commits merged into from
Jul 27, 2021
Merged

Conversation

emostov
Copy link
Contributor

@emostov emostov commented Jul 22, 2021

closes #9408

The main thing left out of this is moving the storage items and types to their own module (they are left in lib.rs for now). I think that should be easy to do in a follow up PR and leaving it out now will make it slightly easier to merge this change into other open PRs that touch staking.

Note, the visibility on few functions in impl.rs was increased from either private or pub(super) to pub(crate).

cc @kianenigma

@emostov
Copy link
Contributor Author

emostov commented Jul 22, 2021

@kianenigma I am thinking for now we can just move the migrations module. And then once the bags PR becomes very stable we can do a bigger re-org. My concern with doing a big re-org now is that transferring those changes to the bags PR would be difficult and may result in us losing some details without realizing.

@kianenigma
Copy link
Contributor

I am fine with both. The bags PR has a small footpring in the rest of the pallet, so I think it is possible to do the full move as well. Nonetheless, this is not worth risking anything. We can always do this later.

@emostov emostov changed the title [WIP] pallet-staking: Reorg migration and pallet and pallet impls pallet-staking: Reorg migration and pallet and pallet impls Jul 27, 2021
@emostov emostov marked this pull request as ready for review July 27, 2021 03:21
@emostov emostov requested a review from kianenigma as a code owner July 27, 2021 03:21
@emostov emostov added A0-please_review Pull request needs code review. B0-silent Changes should not be mentioned in any release notes C1-low PR touches the given topic and has a low impact on builders. D3-trivial 🧸 PR contains trivial changes in a runtime directory that do not require an audit labels Jul 27, 2021
@@ -3415,6 +880,16 @@ where
}
}

/// A `Convert` implementation that finds the stash of the given controller account,
/// if any.
pub struct StashOf<T>(sp_std::marker::PhantomData<T>);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

types.rs?

Copy link
Contributor Author

@emostov emostov Jul 27, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I was thinking something like that for a follow up

Copy link
Contributor

@kianenigma kianenigma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add license header and an appropriate //! single line of module doc to each new file, and I am all fine with this change.

@emostov emostov changed the title pallet-staking: Reorg migration and pallet and pallet impls pallet-staking: Reorg migration, pallet and pallet impls Jul 27, 2021
Copy link
Member

@shawntabrizi shawntabrizi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't really see the need for the pallet folder, rather than a simple lib.rs file for that stuff, but okay.

@emostov
Copy link
Contributor Author

emostov commented Jul 27, 2021

bot merge

@ghost
Copy link

ghost commented Jul 27, 2021

Trying merge.

@ghost ghost merged commit a019b57 into master Jul 27, 2021
This pull request was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A0-please_review Pull request needs code review. B0-silent Changes should not be mentioned in any release notes C1-low PR touches the given topic and has a low impact on builders. D3-trivial 🧸 PR contains trivial changes in a runtime directory that do not require an audit
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Split as much of staking as possible
3 participants