mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-19 21:04:41 +00:00
Fix race condition in VC block proposal service (#1282)
Closes #918 Closes #923
This commit is contained in:
@@ -9,6 +9,7 @@ use node_test_rig::{
|
||||
use rayon::prelude::*;
|
||||
use std::net::{IpAddr, Ipv4Addr};
|
||||
use std::time::Duration;
|
||||
use types::{Epoch, EthSpec, MainnetEthSpec};
|
||||
|
||||
pub fn run_eth1_sim(matches: &ArgMatches) -> Result<(), String> {
|
||||
let node_count = value_t!(matches, "nodes", usize).expect("missing nodes default");
|
||||
@@ -146,9 +147,15 @@ pub fn run_eth1_sim(matches: &ArgMatches) -> Result<(), String> {
|
||||
* tests start at the right time. Whilst this is works well for now, it's subject to
|
||||
* breakage by changes to the VC.
|
||||
*/
|
||||
let (finalization, validator_count, onboarding) = futures::join!(
|
||||
let (finalization, block_prod, validator_count, onboarding) = futures::join!(
|
||||
// Check that the chain finalizes at the first given opportunity.
|
||||
checks::verify_first_finalization(network.clone(), slot_duration),
|
||||
// Check that a block is produced at every slot.
|
||||
checks::verify_full_block_production_up_to(
|
||||
network.clone(),
|
||||
Epoch::new(4).start_slot(MainnetEthSpec::slots_per_epoch()),
|
||||
slot_duration,
|
||||
),
|
||||
// Check that the chain starts with the expected validator count.
|
||||
checks::verify_initial_validator_count(
|
||||
network.clone(),
|
||||
@@ -164,6 +171,7 @@ pub fn run_eth1_sim(matches: &ArgMatches) -> Result<(), String> {
|
||||
)
|
||||
);
|
||||
|
||||
block_prod?;
|
||||
finalization?;
|
||||
validator_count?;
|
||||
onboarding?;
|
||||
|
||||
Reference in New Issue
Block a user