-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
impl_tanssi_pallets_config!
macro for container chains
#416
Conversation
Coverage Report@@ Coverage Diff @@
## master jeremy-construct-tanssi-runtime-macro +/- ##
========================================================================
Coverage 77.37% 77.37% 0.00%
+ Files 109 110 +1
+ Lines 28595 28620 +25
========================================================================
+ Hits 22123 22144 +21
+ Misses 6472 6476 +4
|
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.
Love this! Maybe we should put the impl-tanssi-pallets-config in dancekit though, what do you think @nanocryk? Ideally dancekit should contain the tools to implement a runtime. But we can do it in a separate PR
@@ -917,6 +889,15 @@ impl pallet_tx_pause::Config for Runtime { | |||
type WeightInfo = pallet_tx_pause::weights::SubstrateWeight<Runtime>; | |||
} | |||
|
|||
impl tp_impl_tanssi_pallets_config::Config for Runtime { | |||
const SLOT_DURATION: u64 = SLOT_DURATION; |
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.
@girazoki is this configurable? Won't container chains break if you set this to something other than 12?
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.
I think if they missconfigure it, they wont produce blocks. So yeah maybe its better if we set it ourselves. @nanocryk can you do that?
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.
Maybe let's keep this until we change it to 6 seconds, the transition will be easier if this is configurable
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.
"easier"
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.
😭
@nanocryk can you merge master back? I think we can merge this after. |
…nssi-runtime-macro
Provide a new
impl_tanssi_pallets_config!
macro that implementsConfig
frompallet_author_inherent
,pallet_timestamp
andpallet_cc_authorities_noting
with the proper parameters to work with Tanssi.Customizable parameters are set by impl
impl_tanssi_pallets_config::Config
.The macro can't check at compile time that the pallets have been listed in the
construct_runtime!
macro, however it will generate a test for that.