Skip to content

Commit

Permalink
chore: use online_load, add inline macro
Browse files Browse the repository at this point in the history
  • Loading branch information
merklefruit committed Aug 25, 2024
1 parent c685369 commit 4160171
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions crates/kona-providers/src/blob_provider.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,13 @@ impl LayeredBlobProvider {
}

/// Inserts multiple blobs into the in-memory provider.
#[inline]
pub fn insert_blobs(&mut self, block_hash: B256, blobs: Vec<Blob>) {
self.memory.lock().insert_blobs(block_hash, blobs);
}

/// Attempts to fetch blobs using the in-memory blob store.
#[inline]
async fn memory_blob_load(
&mut self,
block_ref: &BlockInfo,
Expand All @@ -122,7 +124,7 @@ impl LayeredBlobProvider {
}

/// Attempts to fetch blobs using the online blob provider.
#[allow(unused)]
#[inline]
async fn online_blob_load(
&mut self,
block_ref: &BlockInfo,
Expand All @@ -144,7 +146,7 @@ impl BlobProvider for LayeredBlobProvider {
return Ok(b);
} else {
warn!("Blob provider falling back to online provider");
self.online.get_blobs(block_ref, blob_hashes).await
self.online_blob_load(block_ref, blob_hashes).await
}
}
}

0 comments on commit 4160171

Please sign in to comment.