fix is_empty check

This commit is contained in:
realbigsean 2022-12-16 15:16:17 -05:00
parent 4570ccd233
commit 22ed36bc6a
No known key found for this signature in database
GPG Key ID: B372B64D866BF8CC

View File

@ -50,7 +50,7 @@ impl<T: EthSpec> BlockBlobRequestInfo<T> {
} }
pub fn pop_response(&mut self) -> Option<SignedBeaconBlockAndBlobsSidecar<T>> { pub fn pop_response(&mut self) -> Option<SignedBeaconBlockAndBlobsSidecar<T>> {
if !self.accumulated_blocks.is_empty() && !self.accumulated_blocks.is_empty() { if !self.accumulated_blocks.is_empty() && !self.accumulated_sidecars.is_empty() {
let beacon_block = self.accumulated_blocks.pop_front().expect("non empty"); let beacon_block = self.accumulated_blocks.pop_front().expect("non empty");
let blobs_sidecar = self.accumulated_sidecars.pop_front().expect("non empty"); let blobs_sidecar = self.accumulated_sidecars.pop_front().expect("non empty");
return Some(SignedBeaconBlockAndBlobsSidecar { return Some(SignedBeaconBlockAndBlobsSidecar {