This commit is contained in:
Eitan Seri-Levi
2025-02-10 00:37:04 +02:00
parent 30136ad571
commit f790c22123
4 changed files with 14 additions and 8 deletions

View File

@@ -12,9 +12,7 @@ pub fn inclusion_list_duties<T: BeaconChainTypes>(
request_indices: &[u64],
chain: &BeaconChain<T>,
) -> Result<ApiDuties, warp::reject::Rejection> {
let current_epoch = chain
.epoch()
.map_err(warp_utils::reject::unhandled_error)?;
let current_epoch = chain.epoch().map_err(warp_utils::reject::unhandled_error)?;
// Determine what the current epoch would be if we fast-forward our system clock by
// `MAXIMUM_GOSSIP_CLOCK_DISPARITY`.

View File

@@ -2674,7 +2674,11 @@ impl ApiTester {
let slot = self.chain.slot().unwrap();
self.harness.extend_to_slot(slot).await;
for validator_indices in self.interesting_validator_indices() {
let res = self.client.post_validator_duties_inclusion_list(current_epoch, &validator_indices).await.unwrap();
let res = self
.client
.post_validator_duties_inclusion_list(current_epoch, &validator_indices)
.await
.unwrap();
println!("{:?}", res)
}
self
@@ -7330,7 +7334,7 @@ async fn create_signed_inclusion_lists() {
}
#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
async fn test_post_validator_duties_inclusion_list () {
async fn test_post_validator_duties_inclusion_list() {
let mut config = ApiTesterConfig::default();
config.spec.altair_fork_epoch = Some(Epoch::new(0));
config.spec.bellatrix_fork_epoch = Some(Epoch::new(0));