mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-15 10:21:05 +00:00
Refactor alliance benchmarks to v2 (#1868)
- This PR refactors `alliance/src/benchmarkings.rs` to use benchmarking v2. These changes are needed to improve the readability and maintainability of the benchmarking code. - No known issue to backlink. ## Local Testing 1. `cargo build --features runtime-benchmarks` 2. `cargo run --locked --release -p node-cli --bin substrate-node --features runtime-benchmarks -- benchmark pallet --execution wasm --wasm-execution compiled --chain dev --pallet "*" --extrinsic "*" --steps 2 --repeat 1`
This commit is contained in:
@@ -33,9 +33,7 @@ pub(crate) fn weight_witness_warning(
|
||||
if dev_mode {
|
||||
return
|
||||
}
|
||||
let CallWeightDef::Immediate(w) = &method.weight else {
|
||||
return;
|
||||
};
|
||||
let CallWeightDef::Immediate(w) = &method.weight else { return };
|
||||
|
||||
let partial_warning = Warning::new_deprecated("UncheckedWeightWitness")
|
||||
.old("not check weight witness data")
|
||||
@@ -66,9 +64,7 @@ pub(crate) fn weight_constant_warning(
|
||||
if dev_mode {
|
||||
return
|
||||
}
|
||||
let syn::Expr::Lit(lit) = weight else {
|
||||
return;
|
||||
};
|
||||
let syn::Expr::Lit(lit) = weight else { return };
|
||||
|
||||
let warning = Warning::new_deprecated("ConstantWeight")
|
||||
.index(warnings.len())
|
||||
|
||||
Reference in New Issue
Block a user