v0.3.8-pre.004

This commit is contained in:
2026-09-03 12:32:53 +02:00
parent 009b957523
commit c4198ac656
17 changed files with 902 additions and 46 deletions

View File

@@ -1,5 +1,5 @@
// file: crates/ksp-store-lib/src/store.rs
// version: 7
// version: 8
/// Opaque common Store runtime facade.
///
@@ -324,6 +324,36 @@ impl ksp_store_api::RawTransactionRead for Store {
}
}
impl ksp_store_api::RawTransactionInspectionRead for Store {
fn inspect_raw_transactions<'a>(
&'a self,
query: &'a ksp_store_api::RawTransactionInspectionQuery,
) -> ksp_store_api::StoreApiFuture<'a, ksp_store_api::Result<ksp_store_api::RawInspectionPage<ksp_store_api::RawTransactionSummary>>> {
let network_check = validate_operation_network(&self.network, query.network(), self.backend_kind);
if let std::result::Result::Err(error) = network_check {
return std::boxed::Box::pin(async move {
return std::result::Result::Err(error);
});
}
return std::boxed::Box::pin(async move {
#[cfg(feature = "postgres")]
{
return match &self.runtime {
StoreRuntime::Postgres(backend) => {
let result = backend.inspect_raw_transactions(query).await;
result.map_err(|error| return map_postgres_error(error, self.backend_kind, self.network.as_str()))
},
};
}
#[cfg(not(feature = "postgres"))]
{
let _ = query;
return std::result::Result::Err(unavailable_runtime_error(self.backend_kind));
}
});
}
}
impl ksp_store_api::RawTransactionWrite for Store {
fn persist_raw_transaction_acquisition<'a>(
&'a self,