-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adjust session consumer part.1 (#229)
- Loading branch information
1 parent
668fde3
commit cf9038f
Showing
6 changed files
with
155 additions
and
89 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// darwinia | ||
use crate::*; | ||
|
||
impl<S> Processor<S> { | ||
pub fn process_session(&mut self) -> (Set, Set) { | ||
// Session storage items. | ||
// https://github.dev/darwinia-network/substrate/blob/darwinia-v0.12.5/frame/session/src/lib.rs#L532 | ||
|
||
let prefix = item_key(b"Session", b"NextKeys"); | ||
|
||
let mut s_keys = Set::default(); | ||
let mut p_keys = Set::default(); | ||
|
||
self.solo_state.take_keys(&prefix, &mut s_keys, |k, _| { | ||
blake2_128_concat_to_string(key_to_account32(k)) | ||
}); | ||
self.para_state.take_keys(&prefix, &mut p_keys, |k, _| { | ||
blake2_128_concat_to_string(key_to_account32(k)) | ||
}); | ||
|
||
(s_keys, p_keys) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters