Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
fix/compile: missing shared:: prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
Bernhard Schuster committed Jun 11, 2020
1 parent bd55072 commit 8f26282
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions frame/session/src/historical/offchain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ impl<T: Trait> ValidatorSet<T> {
/// If none is found or decodable given `prefix` and `session`, it will return `None`.
/// Empty validator sets should only ever exist for genesis blocks.
pub fn load_from_offchain_db(session_index: SessionIndex) -> Option<Self> {
let derived_key = shared::derive_key(PREFIX, session_index);
let derived_key = shared::derive_key(shared::PREFIX, session_index);
StorageValueRef::persistent(derived_key.as_ref())
.get::<Vec<(T::ValidatorId, T::FullIdentification)>>()
.flatten()
Expand All @@ -69,7 +69,7 @@ impl<T: Trait> ValidatorSet<T> {
/// than the stored one, in which case the conservative choice is made to keep records
/// up to the one that is the lesser.
pub fn prune_older_than(first_to_keep: SessionIndex) {
let derived_key = LAST_PRUNE.to_vec();
let derived_key = shared::LAST_PRUNE.to_vec();
let entry = StorageValueRef::persistent(derived_key.as_ref());
match entry.mutate(|current: Option<Option<SessionIndex>>| -> Result<_, ()> {
match current {
Expand All @@ -87,7 +87,7 @@ impl<T: Trait> ValidatorSet<T> {
// on a re-org this is not necessarily true, with the above they might be equal
if new_value < first_to_keep {
for session_index in new_value..first_to_keep {
let derived_key = shared::derive_key(PREFIX, session_index);
let derived_key = shared::derive_key(shared::PREFIX, session_index);
let _ = StorageValueRef::persistent(derived_key.as_ref()).clear();
}
}
Expand Down

0 comments on commit 8f26282

Please sign in to comment.