Tests and docs, plus some fixes.

This commit is contained in:
Gav
2018-01-22 20:22:38 +01:00
parent cf7bd8a6cd
commit baa0cfcc9a
5 changed files with 395 additions and 11 deletions
@@ -59,6 +59,11 @@ pub fn length() -> BlockNumber {
Storable::lookup_default(b"ses:len")
}
/// The number of validators currently.
pub fn validator_count() -> usize {
ValidatorStorageVec::count() as usize
}
/// The current era index.
pub fn current_index() -> BlockNumber {
Storable::lookup_default(b"ses:ind")