diff --git a/prdoc/pr_7046.prdoc b/prdoc/pr_7046.prdoc new file mode 100644 index 0000000000000000000000000000000000000000..113cc9c7aac5cc0d1b36cb2b8f0e3105dcc622b9 --- /dev/null +++ b/prdoc/pr_7046.prdoc @@ -0,0 +1,7 @@ +title: adding warning when using default substrateWeight in production +doc: +- audience: Runtime Dev + description: |- + PR for #3581 + Added a cfg to show a deprecated warning message when using std +crates: [] diff --git a/templates/parachain/pallets/template/src/weights.rs b/templates/parachain/pallets/template/src/weights.rs index 9295492bc20bc919fa7f728260a25e9f0de31005..4d6dd5642a1ed3314e153412e1baf24cd0f23781 100644 --- a/templates/parachain/pallets/template/src/weights.rs +++ b/templates/parachain/pallets/template/src/weights.rs @@ -39,6 +39,12 @@ pub trait WeightInfo { } /// Weights for pallet_template using the Substrate node and recommended hardware. +#[cfg_attr( + not(feature = "std"), + deprecated( + note = "SubstrateWeight is auto-generated and should not be used in production. Replace it with runtime benchmarked weights." + ) +)] pub struct SubstrateWeight<T>(PhantomData<T>); impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> { /// Storage: Template Something (r:0 w:1)