Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions frame/bags-list/src/benchmarks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,10 @@ frame_benchmarking::benchmarks! {
// - 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.

// clear any pre-existing storage.
// NOTE: safe to call outside block production
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

interesting, because in the genesis we put some stuff in there and this causes issues.

@emostov perhaps this should be called in all benchmarks, specually ones where we use the ListScenario?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is being called in the other ones in the beginning as well, probably an oversight that it was not the case here.

List::<T>::unsafe_clear();

let bag_thresh = T::BagThresholds::get()[0];

// insert the nodes in order
Expand Down