diff --git a/magicblock-ledger/src/store/api.rs b/magicblock-ledger/src/store/api.rs index 967a8959a..bb9573da3 100644 --- a/magicblock-ledger/src/store/api.rs +++ b/magicblock-ledger/src/store/api.rs @@ -396,7 +396,7 @@ impl Ledger { let previous_blockhash = self.get_block_hash(previous_slot)?; let transactions = { - let _lock = self.check_lowest_cleanup_slot(slot); + let _lock = self.check_lowest_cleanup_slot(slot)?; let index_iterator = self .slot_signatures_cf .iter_current_index_filtered(IteratorMode::From( @@ -422,9 +422,17 @@ impl Ledger { .transaction_status_cf .get_protobuf((tx_signature, slot))? .ok_or(LedgerError::TransactionStatusMetaNotFound)?; + let meta = TransactionStatusMeta::try_from(meta).map_err( + |e| { + LedgerError::TransactionConversionError(format!( + "failed to convert transaction status meta at slot {}: {}", + slot, e + )) + }, + )?; Ok(VersionedTransactionWithStatusMeta { transaction, - meta: TransactionStatusMeta::try_from(meta).unwrap(), + meta, }) }) .collect::>>()