v0.3.15-pre.007

This commit is contained in:
2026-09-13 17:36:06 +02:00
parent 487bcbf0c1
commit 0d9ec5c490
20 changed files with 1071 additions and 109 deletions

View File

@@ -1,5 +1,5 @@
// file: crates/ksp-app-raw-transaction-ingest-desk/src/route_inventory.rs
// version: 3
// version: 4
//! Config-only logical route inventory for Raw Transaction Ingest Desk.
@@ -48,7 +48,10 @@ impl RouteCapabilities {
}
/// Rebuilds the complete safe route inventory from validated Config without opening any network, Store or Worker resource.
pub(crate) fn build_route_inventory(management: &ksp_config_lib::ConfigManagement, generation: u32) -> ksp_core_lib::Result<crate::RawIngestRouteInventoryDto> {
pub(crate) fn build_route_inventory(
management: &ksp_config_lib::ConfigManagement,
generation: u32,
) -> ksp_core_lib::Result<crate::RawIngestRouteInventoryDto> {
let environment = ksp_config_lib::ConfigEnvironment::load();
let environment = match environment {
std::result::Result::Ok(value) => value,
@@ -57,7 +60,8 @@ pub(crate) fn build_route_inventory(management: &ksp_config_lib::ConfigManagemen
return build_route_inventory_with_environment(management, &environment, generation);
}
fn build_route_inventory_with_environment(
/// Rebuilds the complete safe route inventory from one already captured Config environment snapshot.
pub(crate) pub(crate) fn build_route_inventory_with_environment(
management: &ksp_config_lib::ConfigManagement,
environment: &ksp_config_lib::ConfigEnvironment,
generation: u32,
@@ -69,7 +73,12 @@ fn build_route_inventory_with_environment(
};
let mut profiles = std::vec::Vec::with_capacity(catalog.profile_ids.len());
for profile_id in &catalog.profile_ids {
profiles.push(build_profile_inventory(management, environment, profile_id.as_str(), profile_id == &catalog.default_profile));
profiles.push(build_profile_inventory(
management,
environment,
profile_id.as_str(),
profile_id == &catalog.default_profile,
));
}
ksp_logging_lib::debug!(
target: crate::TRACING_TARGET,
@@ -155,8 +164,11 @@ fn build_profile_inventory(
},
};
let network = store.settings().network().as_str().to_owned();
let base_transport_profile =
crate::required_composite_component_profile(&composite, crate::COMPOSITE_COMPONENT_ID_TRANSPORT, ksp_config_lib::FILE_ID_STD_TRANSPORT);
let base_transport_profile = crate::required_composite_component_profile(
&composite,
crate::COMPOSITE_COMPONENT_ID_TRANSPORT,
ksp_config_lib::FILE_ID_STD_TRANSPORT,
);
let base_transport_profile = match base_transport_profile {
std::result::Result::Ok(value) => value,
std::result::Result::Err(_) => {
@@ -172,7 +184,12 @@ fn build_profile_inventory(
let base_transport = match base_transport {
std::result::Result::Ok(value) => value,
std::result::Result::Err(error) => {
return unavailable_profile(profile_id, is_default, std::option::Option::Some(network.as_str()), resolution_error_reason(&error));
return unavailable_profile(
profile_id,
is_default,
std::option::Option::Some(network.as_str()),
resolution_error_reason(&error),
);
},
};
if !transport_matches_network(&base_transport, network.as_str()) {