mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-12 04:11:07 +00:00
Update Staking Weights (#5964)
This commit is contained in:
@@ -170,6 +170,14 @@ impl<
|
||||
offset
|
||||
})
|
||||
}
|
||||
|
||||
fn weight(_now: BlockNumber) -> Weight {
|
||||
// Weight note: `estimate_next_session_rotation` has no storage reads and trivial computational overhead.
|
||||
// There should be no risk to the chain having this weight value be zero for now.
|
||||
// However, this value of zero was not properly calculated, and so it would be reasonable
|
||||
// to come back here and properly calculate the weight of this function.
|
||||
0
|
||||
}
|
||||
}
|
||||
|
||||
/// A trait for managing creation of new validator set.
|
||||
@@ -785,4 +793,8 @@ impl<T: Trait> EstimateNextNewSession<T::BlockNumber> for Module<T> {
|
||||
fn estimate_next_new_session(now: T::BlockNumber) -> Option<T::BlockNumber> {
|
||||
T::NextSessionRotation::estimate_next_session_rotation(now)
|
||||
}
|
||||
|
||||
fn weight(now: T::BlockNumber) -> Weight {
|
||||
T::NextSessionRotation::weight(now)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user