Don't request block components until having block (#5774)

* Don't request block components until having block

* Update tests

* Resolve todo comment

* Merge branch 'unstable' into request-blocks-first
This commit is contained in:
Lion - dapplion
2024-05-14 17:50:38 +03:00
committed by GitHub
parent ce66ab374e
commit 683d9df63b
6 changed files with 207 additions and 314 deletions

View File

@@ -816,7 +816,7 @@ impl<T: BeaconChainTypes> SyncManager<T> {
peer_id: PeerId,
block: RpcEvent<Arc<SignedBeaconBlock<T::EthSpec>>>,
) {
if let Some(resp) = self.network.on_single_block_response(id, block) {
if let Some(resp) = self.network.on_single_block_response(id, peer_id, block) {
self.block_lookups
.on_download_response::<BlockRequestState<T::EthSpec>>(
id,
@@ -858,7 +858,7 @@ impl<T: BeaconChainTypes> SyncManager<T> {
peer_id: PeerId,
blob: RpcEvent<Arc<BlobSidecar<T::EthSpec>>>,
) {
if let Some(resp) = self.network.on_single_blob_response(id, blob) {
if let Some(resp) = self.network.on_single_blob_response(id, peer_id, blob) {
self.block_lookups
.on_download_response::<BlobRequestState<T::EthSpec>>(
id,