Companion for Weight v1.5 Follow Up (#5949)

* updates

* remove new

* fix up some stuff

* fix cargo files

* fix

* fix template

* update lockfile for {"substrate"}

* Update block_weights.rs

* remove unused

* remove unused

Co-authored-by: parity-processbot <>
This commit is contained in:
Shawn Tabrizi
2022-09-01 20:00:51 +01:00
committed by GitHub
parent 75d49dfeb4
commit e28bf2e476
128 changed files with 969 additions and 968 deletions
+5 -5
View File
@@ -449,7 +449,7 @@ impl WeightInfo for TestWeightInfo {
}
fn include_pvf_check_statement() -> Weight {
// This special value is to distinguish from the finalizing variants above in tests.
Weight::MAX - Weight::one()
Weight::MAX - Weight::from_ref_time(1)
}
}
@@ -1372,7 +1372,7 @@ impl<T: Config> Pallet<T> {
sessions_observed: SessionIndex,
cfg: &configuration::HostConfiguration<T::BlockNumber>,
) -> Weight {
let mut weight = Weight::new();
let mut weight = Weight::zero();
for cause in causes {
weight += T::DbWeight::get().reads_writes(3, 2);
Self::deposit_event(Event::PvfCheckAccepted(*code_hash, cause.para_id()));
@@ -1417,7 +1417,7 @@ impl<T: Config> Pallet<T> {
relay_parent_number: T::BlockNumber,
cfg: &configuration::HostConfiguration<T::BlockNumber>,
) -> Weight {
let mut weight = Weight::new();
let mut weight = Weight::zero();
// Compute the relay-chain block number starting at which the code upgrade is ready to be
// applied.
@@ -1457,7 +1457,7 @@ impl<T: Config> Pallet<T> {
code_hash: &ValidationCodeHash,
causes: Vec<PvfCheckCause<T::BlockNumber>>,
) -> Weight {
let mut weight = Weight::new();
let mut weight = Weight::zero();
for cause in causes {
// Whenever PVF pre-checking is started or a new cause is added to it, the RC is bumped.
@@ -1746,7 +1746,7 @@ impl<T: Config> Pallet<T> {
code: ValidationCode,
cfg: &configuration::HostConfiguration<T::BlockNumber>,
) -> Weight {
let mut weight = Weight::new();
let mut weight = Weight::zero();
weight += T::DbWeight::get().reads_writes(3, 2);
Self::deposit_event(Event::PvfCheckStarted(code_hash, cause.para_id()));