Make some BeaconChain functions private

This commit is contained in:
Paul Hauner
2019-05-30 18:38:41 +10:00
parent 5a5eebca06
commit 8acffcc0db
3 changed files with 8 additions and 8 deletions

View File

@@ -68,7 +68,7 @@ where
info!(
log,
"Loaded BeaconChain from store";
"slot" => beacon_chain.state.read().slot,
"slot" => beacon_chain.head().beacon_state.slot,
"best_slot" => beacon_chain.best_slot(),
);

View File

@@ -75,7 +75,7 @@ where
// If we don't block here we create an initial scenario where we're unable to process any
// blocks and we're basically useless.
{
let state_slot = beacon_chain.state.read().slot;
let state_slot = beacon_chain.head().beacon_state.slot;
let wall_clock_slot = beacon_chain.read_slot_clock().unwrap();
let slots_since_genesis = beacon_chain.slots_since_genesis().unwrap();
info!(
@@ -91,7 +91,7 @@ where
info!(
log,
"State initialized";
"state_slot" => beacon_chain.state.read().slot,
"state_slot" => beacon_chain.head().beacon_state.slot,
"wall_clock_slot" => beacon_chain.read_slot_clock().unwrap(),
);
@@ -190,7 +190,7 @@ fn do_state_catchup<T: BeaconChainTypes>(chain: &Arc<BeaconChain<T>>, log: &slog
"best_slot" => chain.head().beacon_block.slot,
"latest_block_root" => format!("{}", chain.head().beacon_block_root),
"wall_clock_slot" => chain.read_slot_clock().unwrap(),
"state_slot" => chain.state.read().slot,
"state_slot" => chain.head().beacon_state.slot,
"slots_since_genesis" => genesis_height,
);