merge upstream, add back get_blobs logic

This commit is contained in:
realbigsean
2023-02-13 16:29:21 -05:00
parent c6dfa7a1ac
commit 28702c9d5d
20 changed files with 434 additions and 130 deletions

View File

@@ -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 {

View File

@@ -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