SlotDuration: Always fetch the slot duration from the runtime (#10509)

* SlotDuration: Always fetch the slot duration from the runtime

The slot duration should always be fetched from the runtime instead of being cached in the db. The
slot duration is only fetched on startup of the node, so the performance isn't that important. This
is especially helpful for the case when the slot duration of a chain should be changed through a
runtime upgrade (there be dragons, so take care).

* Fix docs

* Remove logging

* Fix warning
This commit is contained in:
Bastian Köcher
2021-12-20 20:49:18 +01:00
committed by GitHub
parent a043ad3bc8
commit 494dee7c7b
14 changed files with 40 additions and 95 deletions
+1 -1
View File
@@ -196,7 +196,7 @@ pub fn new_partial(
let justification_import = grandpa_block_import.clone();
let (block_import, babe_link) = sc_consensus_babe::block_import(
sc_consensus_babe::Config::get_or_compute(&*client)?,
sc_consensus_babe::Config::get(&*client)?,
grandpa_block_import,
client.clone(),
)?;