Update account manager config parsing

This commit is contained in:
Paul Hauner
2019-06-09 04:34:56 -04:00
parent 3487b16ce5
commit ab12787610
12 changed files with 66 additions and 96 deletions

View File

@@ -453,11 +453,7 @@ impl<T: EthSpec> BeaconState<T> {
///
/// Spec v0.6.0
// FIXME(sproul): name swap with get_block_root
pub fn get_block_root_at_epoch(
&self,
epoch: Epoch,
spec: &ChainSpec,
) -> Result<&Hash256, BeaconStateError> {
pub fn get_block_root_at_epoch(&self, epoch: Epoch) -> Result<&Hash256, BeaconStateError> {
self.get_block_root(epoch.start_slot(T::slots_per_epoch()))
}

View File

@@ -1,6 +1,6 @@
use crate::{
test_utils::{fork_from_hex_str, TestRandom},
ChainSpec, Epoch,
Epoch,
};
use serde_derive::{Deserialize, Serialize};
@@ -58,6 +58,7 @@ impl Fork {
#[cfg(test)]
mod tests {
use super::*;
use crate::ChainSpec;
ssz_tests!(Fork);
cached_tree_hash_tests!(Fork);