mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 04:41:03 +00:00
Clear storage before running the bench (#11109)
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
This commit is contained in:
committed by
GitHub
parent
44e71d8d7e
commit
879960a815
@@ -144,6 +144,10 @@ frame_benchmarking::benchmarks! {
|
|||||||
// - both heavier's `prev` and `next` are nodes that will need to be read and written.
|
// - both heavier's `prev` and `next` are nodes that will need to be read and written.
|
||||||
// - `lighter` is the bag's `head`, so the bag will need to be read and written.
|
// - `lighter` is the bag's `head`, so the bag will need to be read and written.
|
||||||
|
|
||||||
|
// clear any pre-existing storage.
|
||||||
|
// NOTE: safe to call outside block production
|
||||||
|
List::<T>::unsafe_clear();
|
||||||
|
|
||||||
let bag_thresh = T::BagThresholds::get()[0];
|
let bag_thresh = T::BagThresholds::get()[0];
|
||||||
|
|
||||||
// insert the nodes in order
|
// insert the nodes in order
|
||||||
|
|||||||
Reference in New Issue
Block a user