mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-20 05:14:35 +00:00
peerdas-devnet-7: update DataColumnSidecarsByRoot request to use DataColumnsByRootIdentifier (#7399)
Update DataColumnSidecarsByRoot request to use DataColumnsByRootIdentifier #7377 As described in https://github.com/ethereum/consensus-specs/pull/4284
This commit is contained in:
@@ -979,18 +979,13 @@ impl TestRig {
|
||||
request: RequestType::DataColumnsByRoot(request),
|
||||
app_request_id:
|
||||
AppRequestId::Sync(id @ SyncRequestId::DataColumnsByRoot { .. }),
|
||||
} if request
|
||||
.data_column_ids
|
||||
.to_vec()
|
||||
.iter()
|
||||
.any(|r| r.block_root == block_root) =>
|
||||
{
|
||||
let indices = request
|
||||
} => {
|
||||
let matching = request
|
||||
.data_column_ids
|
||||
.to_vec()
|
||||
.iter()
|
||||
.map(|cid| cid.index)
|
||||
.collect::<Vec<_>>();
|
||||
.find(|id| id.block_root == block_root)?;
|
||||
|
||||
let indices = matching.columns.iter().copied().collect();
|
||||
Some((*id, indices))
|
||||
}
|
||||
_ => None,
|
||||
|
||||
Reference in New Issue
Block a user