mirror of
https://github.com/sigp/lighthouse.git
synced 2026-04-17 12:58:31 +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:
@@ -59,7 +59,14 @@ fn finalizes_after_resuming_from_db() {
|
||||
);
|
||||
|
||||
assert!(
|
||||
harness.chain.head().beacon_state.finalized_checkpoint.epoch > 0,
|
||||
harness
|
||||
.chain
|
||||
.head()
|
||||
.expect("should read head")
|
||||
.beacon_state
|
||||
.finalized_checkpoint
|
||||
.epoch
|
||||
> 0,
|
||||
"the chain should have already finalized"
|
||||
);
|
||||
|
||||
@@ -95,7 +102,11 @@ fn finalizes_after_resuming_from_db() {
|
||||
AttestationStrategy::AllValidators,
|
||||
);
|
||||
|
||||
let state = &resumed_harness.chain.head().beacon_state;
|
||||
let state = &resumed_harness
|
||||
.chain
|
||||
.head()
|
||||
.expect("should read head")
|
||||
.beacon_state;
|
||||
assert_eq!(
|
||||
state.slot, num_blocks_produced,
|
||||
"head should be at the current slot"
|
||||
|
||||
Reference in New Issue
Block a user