mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-14 10:22:38 +00:00
merge upstream, add back get_blobs logic
This commit is contained in:
@@ -799,7 +799,7 @@ impl<T: BeaconChainTypes> Worker<T> {
|
||||
let mut send_response = true;
|
||||
|
||||
for root in block_roots {
|
||||
match self.chain.get_blobs(&root) {
|
||||
match self.chain.get_blobs(&root, data_availability_boundary) {
|
||||
Ok(Some(blobs)) => {
|
||||
blobs_sent += 1;
|
||||
self.send_network_message(NetworkMessage::SendResponse {
|
||||
|
||||
@@ -560,7 +560,7 @@ impl<T: BeaconChainTypes> SyncNetworkContext<T> {
|
||||
|
||||
/// Check whether a batch for this epoch (and only this epoch) should request just blocks or
|
||||
/// blocks and blobs.
|
||||
pub fn batch_type(&self, _epoch: types::Epoch) -> ByRangeRequestType {
|
||||
pub fn batch_type(&self, #[cfg(not(test))] epoch: types::Epoch) -> ByRangeRequestType {
|
||||
if super::backfill_sync::BACKFILL_EPOCHS_PER_BATCH * super::range_sync::EPOCHS_PER_BATCH
|
||||
!= 1
|
||||
{
|
||||
@@ -576,7 +576,7 @@ impl<T: BeaconChainTypes> SyncNetworkContext<T> {
|
||||
#[cfg(not(test))]
|
||||
{
|
||||
if let Some(data_availability_boundary) = self.chain.data_availability_boundary() {
|
||||
if _epoch >= data_availability_boundary {
|
||||
if epoch >= data_availability_boundary {
|
||||
ByRangeRequestType::BlocksAndBlobs
|
||||
} else {
|
||||
ByRangeRequestType::Blocks
|
||||
|
||||
Reference in New Issue
Block a user