mirror of
https://github.com/sigp/lighthouse.git
synced 2026-05-08 01:05:47 +00:00
Do not send column requests if there is no blob for the block. (#6814)
* Do not send column requests if there is no blob for the block. * Address review comments * Replace fix - the previous solution didnt work.
This commit is contained in:
@@ -215,8 +215,7 @@ impl<T: BeaconChainTypes> SingleBlockLookup<T> {
|
|||||||
let block_epoch = block.slot().epoch(T::EthSpec::slots_per_epoch());
|
let block_epoch = block.slot().epoch(T::EthSpec::slots_per_epoch());
|
||||||
if expected_blobs == 0 {
|
if expected_blobs == 0 {
|
||||||
self.component_requests = ComponentRequests::NotNeeded("no data");
|
self.component_requests = ComponentRequests::NotNeeded("no data");
|
||||||
}
|
} else if cx.chain.should_fetch_blobs(block_epoch) {
|
||||||
if cx.chain.should_fetch_blobs(block_epoch) {
|
|
||||||
self.component_requests = ComponentRequests::ActiveBlobRequest(
|
self.component_requests = ComponentRequests::ActiveBlobRequest(
|
||||||
BlobRequestState::new(self.block_root),
|
BlobRequestState::new(self.block_root),
|
||||||
expected_blobs,
|
expected_blobs,
|
||||||
|
|||||||
Reference in New Issue
Block a user