v0.2.11-pre.002-fix.003

This commit is contained in:
2026-08-25 20:37:09 +02:00
parent 126e8abfcd
commit 2dbddfe367
15 changed files with 499 additions and 271 deletions

View File

@@ -1,20 +1,20 @@
// file: crates/ksp-offchain-transport-lib/src/market_price_settings.rs
// version: 2
// version: 3
/// Common provider settings embedded by future provider-specific runtime settings.
///
/// Provider-specific credentials, pair selectors and access modes intentionally do not live here because providers without those capabilities must not be
/// forced into artificial fields.
#[derive(Clone, Debug, Eq, PartialEq, serde::Serialize)]
pub struct PriceProviderCommonSettings {
pub struct MarketPriceProviderCommonSettings {
enabled: bool,
provider_id: crate::PriceProviderId,
provider_id: crate::MarketPriceProviderId,
}
impl PriceProviderCommonSettings {
impl MarketPriceProviderCommonSettings {
/// Creates common settings for one uniquely identified runtime provider instance.
#[must_use]
pub fn new(provider_id: crate::PriceProviderId, enabled: bool) -> Self {
pub fn new(provider_id: crate::MarketPriceProviderId, enabled: bool) -> Self {
ksp_logging_lib::trace!(target: crate::TRACING_TARGET, enabled = enabled, "constructed common market-price provider settings");
return Self { enabled, provider_id };
}
@@ -27,7 +27,7 @@ impl PriceProviderCommonSettings {
/// Returns the opaque runtime provider identifier.
#[must_use]
pub const fn provider_id(&self) -> &crate::PriceProviderId {
pub const fn provider_id(&self) -> &crate::MarketPriceProviderId {
return &self.provider_id;
}
}