//! # Weights para `pallet-origin-fees` //! //! ## Estado: INTERIM hand-derived (DB-aware, DoS-safe) — pendiente regeneración HW //! //! Ver `origin-chain-provenance/src/weights.rs` §Estado para el racional completo. //! Resumen: números conservadores derivados a mano (no autogenerados por CLI — //! gated por sc-service/omni-bencher+WASM), pero **DB-aware** vía `T::DbWeight` //! → pueblan ref_time + proof_size por read/write real, cerrando el DoS de los //! placeholders `Weight::from_parts(10_000, 0)` (proof_size = 0, sin contar DB). //! `benchmarking.rs` es la fuente de verdad de la forma. #![allow(unused_parens)] #![allow(unused_imports)] #![allow(clippy::unnecessary_cast)] use core::marker::PhantomData; use frame_support::{traits::Get, weights::constants::RocksDbWeight, weights::Weight}; /// Trait de weights para los extrinsics de `pallet-origin-fees`. pub trait WeightInfo { /// Peso de `set_tier_profile` (Root) — 1 write (TierProfiles). fn set_tier_profile() -> Weight; } /// Weights parametrizados por el `DbWeight` del runtime. pub struct SubstrateWeight(PhantomData); impl WeightInfo for SubstrateWeight { fn set_tier_profile() -> Weight { // ensure_root (in-memory) + insert(TierProfiles) = 1 write. Weight::from_parts(8_000_000, 0).saturating_add(T::DbWeight::get().writes(1_u64)) } } /// Impl no-op para mocks / tests. impl WeightInfo for () { fn set_tier_profile() -> Weight { Weight::from_parts(8_000_000, 0).saturating_add(RocksDbWeight::get().writes(1_u64)) } }