v0.4.8-pre.007

This commit is contained in:
2026-08-06 00:52:08 +02:00
parent 80c439c988
commit 44088c71c9
122 changed files with 8903 additions and 3914 deletions

View File

@@ -0,0 +1,11 @@
// file: kb-lib/src/materializer/lending/constants.rs
// version: 1
//! Local constants for the lending materializer.
/// Stable runtime component name for the lending materializer.
pub(crate) const MT_LENDING_COMPONENT_NAME: &str = "kb-lib.materializer.lending";
/// Stable processor name persisted by the replay ledger.
pub(crate) const MT_LENDING_PROCESSOR_NAME: &str = "materializer.lending";
/// Empty family boundary retained while the materializer is reserved.
pub(crate) const MT_LENDING_ACCEPTED_FAMILIES: &[crate::MdEventFamily] = &[];

View File

@@ -1,5 +1,5 @@
// file: kb-lib/src/materializer/lending/core.rs
// version: 4
// file: kb-lib/src/materializer/lending/materializer.rs
// version: 5
//! Reserved lending materializer.
@@ -9,7 +9,7 @@ pub struct MtLendingMaterializer;
impl crate::MtMaterializer for crate::MtLendingMaterializer {
fn materializer_name(&self) -> &'static str {
return "kb-lib.materializer.lending";
return crate::MT_LENDING_COMPONENT_NAME;
}
fn materializer_version(&self) -> &'static str {
@@ -22,27 +22,22 @@ impl crate::MtMaterializer for crate::MtLendingMaterializer {
fn materialize_event(
&self,
event: &crate::MdDecodedProtocolEvent,
_event: &crate::MdDecodedProtocolEvent,
) -> kb_core::Result<std::vec::Vec<crate::MdMaterializedEvent>> {
return std::result::Result::Ok(std::vec![crate::MdMaterializedEvent {
signature: event.signature.clone(),
slot: event.slot,
decoded_family: event.event_family,
materialized_family: crate::MdMaterializedEventFamily::Lending,
}]);
return std::result::Result::Ok(std::vec::Vec::new());
}
}
impl crate::MtApiEventMaterializer for crate::MtLendingMaterializer {
fn identity(&self) -> crate::MtApiMaterializerIdentity {
return crate::MtApiMaterializerIdentity {
name: "kb-lib.materializer.lending".to_string(),
name: crate::MT_LENDING_PROCESSOR_NAME.to_string(),
version: env!("CARGO_PKG_VERSION").to_string(),
};
}
fn accepted_families(&self) -> &'static [crate::MdEventFamily] {
return &[];
return crate::MT_LENDING_ACCEPTED_FAMILIES;
}
fn transaction_policy(