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

Add claims prefix to the claims trait #309

Merged
merged 3 commits into from Jul 2, 2019
Merged

Add claims prefix to the claims trait #309

merged 3 commits into from Jul 2, 2019

Conversation

shawntabrizi
Copy link
Contributor

@shawntabrizi shawntabrizi commented Jul 2, 2019

Fixes #307

  • Adds a new parameter Prefix to the claims Trait
  • Update tests

@rphmeier rphmeier added the A0-please_review Pull request needs code review. label Jul 2, 2019
So we don't need to set any genesis config yet
@@ -83,35 +83,12 @@ decl_storage! {
Total get(total) build(|config: &GenesisConfig<T>| {
config.claims.iter().fold(Zero::zero(), |acc: BalanceOf<T>, &(_, n)| acc + n)
}): BalanceOf<T>;
Prefix get(prefix) config(): Vec<u8>;
Copy link
Contributor

Choose a reason for hiding this comment

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

I had a comment here earlier that seems to have disappeared.

This should be a Get<&'static [u8]> param so we don't have to go to storage every time.

@shawntabrizi shawntabrizi changed the title Add claims prefix to the genesis configuration Add claims prefix to the claims trait Jul 2, 2019
@shawntabrizi
Copy link
Contributor Author

@rphmeier thanks for the suggestion, I did not know you could do this.

Hopefully all is good now.

@rphmeier rphmeier added A8-looksgood and removed A0-please_review Pull request needs code review. labels Jul 2, 2019
@rphmeier rphmeier merged commit 6b5c392 into paritytech:master Jul 2, 2019
@shawntabrizi shawntabrizi deleted the shawntabrizi-config-claims branch July 2, 2019 23:26
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Claims: parameterizable chain ID for payload
2 participants