mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 01:11:10 +00:00
initial merge
This commit is contained in:
@@ -78,6 +78,11 @@ pub mod privileged {
|
||||
pub fn set_length(new: BlockNumber) {
|
||||
storage::put(NEXT_SESSION_LENGTH, &new);
|
||||
}
|
||||
|
||||
/// Forces a new session.
|
||||
pub fn force_new_session() {
|
||||
rotate_session();
|
||||
}
|
||||
}
|
||||
|
||||
// INTERNAL API (available to other runtime modules)
|
||||
@@ -146,9 +151,9 @@ mod tests {
|
||||
twox_128(&0u32.to_keyed_vec(ValidatorStorageVec::PREFIX)).to_vec() => vec![10; 32],
|
||||
twox_128(&1u32.to_keyed_vec(ValidatorStorageVec::PREFIX)).to_vec() => vec![20; 32],
|
||||
// initial session keys (11, 21, ...)
|
||||
twox_128(b"con:aut:len").to_vec() => vec![].join(&2u32),
|
||||
twox_128(&0u32.to_keyed_vec(b"con:aut:")).to_vec() => vec![11; 32],
|
||||
twox_128(&1u32.to_keyed_vec(b"con:aut:")).to_vec() => vec![21; 32]
|
||||
b":auth:len".to_vec() => vec![].join(&2u32),
|
||||
0u32.to_keyed_vec(b":auth:") => vec![11; 32],
|
||||
1u32.to_keyed_vec(b":auth:") => vec![21; 32]
|
||||
], }
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user