From 6cd8a45292fba243f37d1b3517af9080dcce5b7d Mon Sep 17 00:00:00 2001 From: Robert Habermeier Date: Mon, 28 Dec 2020 05:46:47 -0500 Subject: [PATCH] add a slot-duration getter to babe config (#7793) --- substrate/client/consensus/babe/src/lib.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/substrate/client/consensus/babe/src/lib.rs b/substrate/client/consensus/babe/src/lib.rs index 3f2a583482..bf929992db 100644 --- a/substrate/client/consensus/babe/src/lib.rs +++ b/substrate/client/consensus/babe/src/lib.rs @@ -342,6 +342,11 @@ impl Config { } } } + + /// Get the inner slot duration, in milliseconds. + pub fn slot_duration(&self) -> u64 { + self.0.slot_duration() + } } impl std::ops::Deref for Config {