mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-27 01:07:57 +00:00
Update Balances Pallet to use WeightInfo (#6610)
* Update balance benchmarks * Update weight functions * Remove user component * make componentless * Add support for `#[extra]` tag on benchmarks * Update balances completely * Apply suggestions from code review Co-authored-by: Alexander Theißen <alex.theissen@me.com> * Fix some tests * Maybe fix to test. Need approval from @tomusdrw this is okay * Make test better * keep weights conservative * Update macro for merge master * Add headers * Apply suggestions from code review Co-authored-by: Alexander Popiak <alexander.popiak@parity.io> Co-authored-by: Alexander Theißen <alex.theissen@me.com> Co-authored-by: Alexander Popiak <alexander.popiak@parity.io>
This commit is contained in:
@@ -66,6 +66,7 @@ sp_api::decl_runtime_apis! {
|
||||
highest_range_values: Vec<u32>,
|
||||
steps: Vec<u32>,
|
||||
repeat: u32,
|
||||
extra: bool,
|
||||
) -> Result<Vec<BenchmarkBatch>, RuntimeString>;
|
||||
}
|
||||
}
|
||||
@@ -112,7 +113,11 @@ pub trait Benchmarking {
|
||||
pub trait Benchmarking<T> {
|
||||
/// Get the benchmarks available for this pallet. Generally there is one benchmark per
|
||||
/// extrinsic, so these are sometimes just called "extrinsics".
|
||||
fn benchmarks() -> Vec<&'static [u8]>;
|
||||
///
|
||||
/// Parameters
|
||||
/// - `extra`: Also return benchmarks marked "extra" which would otherwise not be
|
||||
/// needed for weight calculation.
|
||||
fn benchmarks(extra: bool) -> Vec<&'static [u8]>;
|
||||
|
||||
/// Run the benchmarks for this pallet.
|
||||
///
|
||||
|
||||
Reference in New Issue
Block a user