mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-03 00:31:50 +00:00
Add timeouts to canonical head rwlock (#759)
* Add TimeoutRwLock to BeaconChain * Update network crate * Update rest api * Fix beacon chain tests * Fix rest api tests * Set test back to !debug_assertions
This commit is contained in:
@@ -69,7 +69,12 @@ pub fn spawn_notifier<T: BeaconChainTypes>(
|
||||
usize::max_value()
|
||||
};
|
||||
|
||||
let head = beacon_chain.head();
|
||||
let head = beacon_chain.head()
|
||||
.map_err(|e| error!(
|
||||
log,
|
||||
"Failed to get beacon chain head";
|
||||
"error" => format!("{:?}", e)
|
||||
))?;
|
||||
|
||||
let head_slot = head.beacon_block.slot;
|
||||
let head_epoch = head_slot.epoch(T::EthSpec::slots_per_epoch());
|
||||
|
||||
Reference in New Issue
Block a user