Add test to block_store, export BlockAtSlotError

This commit is contained in:
Paul Hauner 2018-10-11 23:50:49 +11:00
parent 8c1d72a32e
commit d729355c09
No known key found for this signature in database
GPG Key ID: 303E4494BB28068C
2 changed files with 7 additions and 1 deletions

View File

@ -208,5 +208,8 @@ mod tests {
let ssz = bs.block_at_slot(&hashes[4], 6).unwrap(); let ssz = bs.block_at_slot(&hashes[4], 6).unwrap();
assert_eq!(ssz, None); assert_eq!(ssz, None);
let ssz = bs.block_at_slot(&Hash256::from("unknown".as_bytes()), 2);
assert_eq!(ssz, Err(BlockAtSlotError::UnknownBlock));
} }
} }

View File

@ -7,7 +7,10 @@ mod block_store;
mod pow_chain_store; mod pow_chain_store;
mod validator_store; mod validator_store;
pub use self::block_store::BlockStore; pub use self::block_store::{
BlockStore,
BlockAtSlotError,
};
pub use self::pow_chain_store::PoWChainStore; pub use self::pow_chain_store::PoWChainStore;
pub use self::validator_store::{ pub use self::validator_store::{
ValidatorStore, ValidatorStore,