-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Replace simple parameter_types #11254
Replace simple parameter_types #11254
Conversation
|
User @bizzyvinci, please sign the CLA here. |
kianenigma
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
grateful to see all that in fact there were numerous unused types defined as well, and they are now removed.
Co-authored-by: Kian Paimani <[email protected]>
|
Seems you need to fix formatting, and some compiler errors. I see in the compiler errors there are some places where the variable value is used. In this case, create a |
|
I'll need help to pass the checks, including commits. Don't know if I've been doing things right with the recent commits. |
|
@bizzyvinci the compile errors are not that hard. Just run |
|
thanks @bkchr. How do I handle format errors? |
|
@bizzyvinci You need to add |
|
Thanks @KiChjang. Now, there are 2 more to go. |
|
bot merge |
|
Waiting for commit status. |
* update bin/node-template/runtime/src/lib.rs * update frame/contracts/src/tests.rs * update frame/executive/src/lib.rs * update frame/grandpa/src/mock.rs * update frame/im-online/src/mock.rs * update frame/offences/benchmarking/src/mock.rs * update frame/recovery/src/mock.rs * update frame/referenda/src/mock.rs * update frame/session/benchmarking/src/mock.rs * update frame/staking/src/mock.rs * update frame/state-trie-migration/src/lib.rs * update frame/support/test/compile_pass/src/lib.rs * frame/treasury/src/tests.rs * update frame/whitelist/src/mock.rs * update frame/vesting/src/mock.rs * update test-utils/runtime/src/lib.rs * update bin/node-template/runtime/src/lib.rs * Update frame/grandpa/src/mock.rs Co-authored-by: Kian Paimani <[email protected]> * resolve failed checks 1518659 & 1518669 * resolve format check * backtrack to resolve compile error * check --all --tests ✅ * cargo +nightly fmt ✅ Co-authored-by: Shawn Tabrizi <[email protected]> Co-authored-by: Kian Paimani <[email protected]> Co-authored-by: Keith Yeung <[email protected]>
* update bin/node-template/runtime/src/lib.rs * update frame/contracts/src/tests.rs * update frame/executive/src/lib.rs * update frame/grandpa/src/mock.rs * update frame/im-online/src/mock.rs * update frame/offences/benchmarking/src/mock.rs * update frame/recovery/src/mock.rs * update frame/referenda/src/mock.rs * update frame/session/benchmarking/src/mock.rs * update frame/staking/src/mock.rs * update frame/state-trie-migration/src/lib.rs * update frame/support/test/compile_pass/src/lib.rs * frame/treasury/src/tests.rs * update frame/whitelist/src/mock.rs * update frame/vesting/src/mock.rs * update test-utils/runtime/src/lib.rs * update bin/node-template/runtime/src/lib.rs * Update frame/grandpa/src/mock.rs Co-authored-by: Kian Paimani <[email protected]> * resolve failed checks 1518659 & 1518669 * resolve format check * backtrack to resolve compile error * check --all --tests ✅ * cargo +nightly fmt ✅ Co-authored-by: Shawn Tabrizi <[email protected]> Co-authored-by: Kian Paimani <[email protected]> Co-authored-by: Keith Yeung <[email protected]>
* update bin/node-template/runtime/src/lib.rs * update frame/contracts/src/tests.rs * update frame/executive/src/lib.rs * update frame/grandpa/src/mock.rs * update frame/im-online/src/mock.rs * update frame/offences/benchmarking/src/mock.rs * update frame/recovery/src/mock.rs * update frame/referenda/src/mock.rs * update frame/session/benchmarking/src/mock.rs * update frame/staking/src/mock.rs * update frame/state-trie-migration/src/lib.rs * update frame/support/test/compile_pass/src/lib.rs * frame/treasury/src/tests.rs * update frame/whitelist/src/mock.rs * update frame/vesting/src/mock.rs * update test-utils/runtime/src/lib.rs * update bin/node-template/runtime/src/lib.rs * Update frame/grandpa/src/mock.rs Co-authored-by: Kian Paimani <[email protected]> * resolve failed checks 1518659 & 1518669 * resolve format check * backtrack to resolve compile error * check --all --tests ✅ * cargo +nightly fmt ✅ Co-authored-by: Shawn Tabrizi <[email protected]> Co-authored-by: Kian Paimani <[email protected]> Co-authored-by: Keith Yeung <[email protected]>
Fixes #10383 and related to #10402. It's an attempt to replace simple
parameter_typesdeclarations withConstUorConstBool.I'm a rust newbie, so I might have screwed up a thing or 2. Also, there are some cases I left out cause I wasn't sure and they include
pub staticbe replaced?pubandpub constwere replacedparameter_typesdeclaration were unused. I removed some in the files I edited.ConstU64<SLOT_DURATION / 2>got to beConstU64<{ SLOT_DURATION / 2 }>, right?parameter_typesord_parameter_types?ConstantMultiplier<Balance, TransactionByteFee>be replaced withConstantMultiplier<Balance, ConstU64<0>>pub const Periodandpub const Offsetparameter_types were left out. I don't think they are simple#A0-pleasereview @thiolliere @KiChjang @bkchr
Polkadot address: 1C2pKczetQS7Rpa9m6cyqhsMcV3mpn6RyB68ZR7wBhbBj1N