mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-20 14:01:02 +00:00
Deprecate Weight::from_{ref_time, proof_size} (#13475)
* Deprecate Weight::from_{ref_time, proof_size}
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Update templates
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Use from_parts
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Use from_parts
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Dont revert comment 🤦
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* ".git/.scripts/commands/bench/bench.sh" pallet dev pallet_balances
* Update weight files
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* More fixes
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Adapt to Master changes
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
---------
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Co-authored-by: command-bot <>
This commit is contained in:
committed by
GitHub
parent
7981d4aa59
commit
9e56e1acdd
@@ -1254,7 +1254,7 @@ mod tests {
|
||||
#[test]
|
||||
fn cannot_consume_too_much_future_weight() {
|
||||
ExtBuilder::default()
|
||||
.signed_weight(Weight::from_ref_time(40).set_proof_size(u64::MAX))
|
||||
.signed_weight(Weight::from_parts(40, u64::MAX))
|
||||
.mock_weight_info(MockedWeightInfo::Basic)
|
||||
.build_and_execute(|| {
|
||||
roll_to_signed();
|
||||
@@ -1268,16 +1268,16 @@ mod tests {
|
||||
raw.solution.unique_targets().len() as u32,
|
||||
);
|
||||
// default solution will have 5 edges (5 * 5 + 10)
|
||||
assert_eq!(solution_weight, Weight::from_ref_time(35));
|
||||
assert_eq!(solution_weight, Weight::from_parts(35, 0));
|
||||
assert_eq!(raw.solution.voter_count(), 5);
|
||||
assert_eq!(
|
||||
<Runtime as Config>::SignedMaxWeight::get(),
|
||||
Weight::from_ref_time(40).set_proof_size(u64::MAX)
|
||||
Weight::from_parts(40, u64::MAX)
|
||||
);
|
||||
|
||||
assert_ok!(MultiPhase::submit(RuntimeOrigin::signed(99), Box::new(raw.clone())));
|
||||
|
||||
<SignedMaxWeight>::set(Weight::from_ref_time(30).set_proof_size(u64::MAX));
|
||||
<SignedMaxWeight>::set(Weight::from_parts(30, u64::MAX));
|
||||
|
||||
// note: resubmitting the same solution is technically okay as long as the queue has
|
||||
// space.
|
||||
|
||||
Reference in New Issue
Block a user