From 8bd970bad8d40c0c573df6f1b47730ec7a960bd9 Mon Sep 17 00:00:00 2001 From: sashass1315 Date: Sat, 6 Dec 2025 19:32:19 +0200 Subject: [PATCH] fix: make get_exact error on missing blobs to match trait contract (#19347) Co-authored-by: Matthias Seitz --- crates/transaction-pool/src/blobstore/mem.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/crates/transaction-pool/src/blobstore/mem.rs b/crates/transaction-pool/src/blobstore/mem.rs index 44dff1cceb..2dbe92b180 100644 --- a/crates/transaction-pool/src/blobstore/mem.rs +++ b/crates/transaction-pool/src/blobstore/mem.rs @@ -99,8 +99,13 @@ impl BlobStore for InMemoryBlobStore { &self, txs: Vec, ) -> Result>, BlobStoreError> { + if txs.is_empty() { + return Ok(Vec::new()); + } let store = self.inner.store.read(); - Ok(txs.into_iter().filter_map(|tx| store.get(&tx).cloned()).collect()) + txs.into_iter() + .map(|tx| store.get(&tx).cloned().ok_or(BlobStoreError::MissingSidecar(tx))) + .collect() } fn get_by_versioned_hashes_v1(