mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-09 20:11:09 +00:00
Add dedicated FeePolynomial struct (#13612)
* Add FeePolynomial struct Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Add Weight::without_{ref_time, proof_size} Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Docs Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Cleanup code Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Add docs Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * doc Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Fix docs Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * docs Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> --------- Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
This commit is contained in:
committed by
GitHub
parent
84f61ba327
commit
fd6b971d22
@@ -74,6 +74,16 @@ impl Weight {
|
||||
&mut self.proof_size
|
||||
}
|
||||
|
||||
/// Return self but discard any reference time.
|
||||
pub const fn without_ref_time(&self) -> Self {
|
||||
Self { ref_time: 0, proof_size: self.proof_size }
|
||||
}
|
||||
|
||||
/// Return self but discard any proof size.
|
||||
pub const fn without_proof_size(&self) -> Self {
|
||||
Self { ref_time: self.ref_time, proof_size: 0 }
|
||||
}
|
||||
|
||||
pub const MAX: Self = Self { ref_time: u64::MAX, proof_size: u64::MAX };
|
||||
|
||||
/// Get the conservative min of `self` and `other` weight.
|
||||
|
||||
Reference in New Issue
Block a user