mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-11 06:01:06 +00:00
Ensure timestamp config makes sense. (#2132)
* Timestamp period should be expressed as expected period * Fix test * Ensure value never illegal * Rename * Remove println * Add default * Comment * Fix, bump and rebuild wasm * Fix test * Add TODOs * Configure only minimum_period. * Fix * Update srml/timestamp/src/lib.rs Co-Authored-By: gavofyork <github@gavwood.com> * Update srml/timestamp/src/lib.rs Co-Authored-By: gavofyork <github@gavwood.com>
This commit is contained in:
@@ -141,7 +141,7 @@ fn staging_testnet_config_genesis() -> GenesisConfig {
|
||||
enact_delay_period: 0,
|
||||
}),
|
||||
timestamp: Some(TimestampConfig {
|
||||
period: SECS_PER_BLOCK / 2, // due to the nature of aura the slots are 2*period
|
||||
minimum_period: SECS_PER_BLOCK / 2, // due to the nature of aura the slots are 2*period
|
||||
}),
|
||||
treasury: Some(TreasuryConfig {
|
||||
proposal_bond: Permill::from_percent(5),
|
||||
@@ -298,7 +298,7 @@ pub fn testnet_genesis(
|
||||
enact_delay_period: 0,
|
||||
}),
|
||||
timestamp: Some(TimestampConfig {
|
||||
period: 2, // 2*2=4 second block time.
|
||||
minimum_period: 2, // 2*2=4 second block time.
|
||||
}),
|
||||
treasury: Some(TreasuryConfig {
|
||||
proposal_bond: Permill::from_percent(5),
|
||||
@@ -367,7 +367,7 @@ mod tests {
|
||||
|
||||
fn local_testnet_genesis_instant() -> GenesisConfig {
|
||||
let mut genesis = local_testnet_genesis();
|
||||
genesis.timestamp = Some(TimestampConfig { period: 0 });
|
||||
genesis.timestamp = Some(TimestampConfig { minimum_period: 1 });
|
||||
genesis
|
||||
}
|
||||
|
||||
|
||||
@@ -58,7 +58,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
|
||||
spec_name: create_runtime_str!("node"),
|
||||
impl_name: create_runtime_str!("substrate-node"),
|
||||
authoring_version: 10,
|
||||
spec_version: 46,
|
||||
spec_version: 47,
|
||||
impl_version: 47,
|
||||
apis: RUNTIME_API_VERSIONS,
|
||||
};
|
||||
|
||||
BIN
Binary file not shown.
Reference in New Issue
Block a user