mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
refactor(txpool): small refactor in DiskFileBlobStoreInner get_exact (#11911)
This commit is contained in:
@ -409,13 +409,9 @@ impl DiskFileBlobStoreInner {
|
||||
/// Returns an error if there are any missing blobs.
|
||||
#[inline]
|
||||
fn get_exact(&self, txs: Vec<B256>) -> Result<Vec<BlobTransactionSidecar>, BlobStoreError> {
|
||||
let mut res = Vec::with_capacity(txs.len());
|
||||
for tx in txs {
|
||||
let blob = self.get_one(tx)?.ok_or_else(|| BlobStoreError::MissingSidecar(tx))?;
|
||||
res.push(blob)
|
||||
}
|
||||
|
||||
Ok(res)
|
||||
txs.into_iter()
|
||||
.map(|tx| self.get_one(tx)?.ok_or(BlobStoreError::MissingSidecar(tx)))
|
||||
.collect()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user