Skip to content
Snippets Groups Projects
Commit 82bf2030 authored by Gav's avatar Gav
Browse files

Fix up session phase.

parent a118a852
No related merge requests found
......@@ -168,9 +168,14 @@ impl<T: Trait> Module<T> {
<CurrentStart<T>>::put(now);
// Enact era length change.
if let Some(next_len) = <NextSessionLength<T>>::take() {
let block_number = <system::Module<T>>::block_number();
let len_changed = if let Some(next_len) = <NextSessionLength<T>>::take() {
<SessionLength<T>>::put(next_len);
true
} else {
false
};
if len_changed || !normal_rotation {
let block_number = <system::Module<T>>::block_number();
<LastLengthChange<T>>::put(block_number);
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment