Fix error messages (#1148)

This commit is contained in:
Akihito Nakano 2020-05-17 14:49:07 +09:00 committed by GitHub
parent 59ead67f76
commit 21901b1615
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -193,7 +193,7 @@ where
let store = self
.store
.clone()
.ok_or_else(|| "load_from_store requires a store.".to_string())?;
.ok_or_else(|| "store_contains_beacon_chain requires a store.".to_string())?;
Ok(store
.get::<PersistedBeaconChain>(&Hash256::from_slice(&BEACON_CHAIN_DB_KEY))
@ -224,7 +224,7 @@ where
let store = self
.store
.clone()
.ok_or_else(|| "load_from_store requires a store.".to_string())?;
.ok_or_else(|| "resume_from_db requires a store.".to_string())?;
let chain = store
.get::<PersistedBeaconChain>(&Hash256::from_slice(&BEACON_CHAIN_DB_KEY))
@ -511,10 +511,10 @@ where
let finalized_snapshot = &self
.finalized_snapshot
.as_ref()
.ok_or_else(|| "fork_choice_backend requires a finalized_snapshot")?;
.ok_or_else(|| "reduced_tree_fork_choice requires a finalized_snapshot")?;
let genesis_block_root = self
.genesis_block_root
.ok_or_else(|| "fork_choice_backend requires a genesis_block_root")?;
.ok_or_else(|| "reduced_tree_fork_choice requires a genesis_block_root")?;
let backend = ProtoArrayForkChoice::new(
finalized_snapshot.beacon_block.message.slot,