Skip to content

Commit

Permalink
Fix benchmarks
Browse files Browse the repository at this point in the history
  • Loading branch information
tmpolaczyk committed Oct 17, 2023
1 parent 0d6d67f commit 5de5bc6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 2 additions & 1 deletion pallets/collator-assignment/src/benchmarking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,11 @@ mod benchmarks {
<CollatorContainerChain<T>>::put(&old_assigned);
// Do not use [0; 32] because that seed will not shuffle the list of collators
let random_seed = [1; 32];
<Randomness<T>>::put(random_seed);

#[block]
{
<Pallet<T>>::initializer_on_new_session(&session_index, random_seed, collators);
<Pallet<T>>::initializer_on_new_session(&session_index, collators);
}

// Assignment changed
Expand Down
4 changes: 1 addition & 3 deletions pallets/collator-assignment/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,14 @@
// You should have received a copy of the GNU General Public License
// along with Tanssi. If not, see <http://www.gnu.org/licenses/>

use frame_support::traits::Hooks;

use {
crate::{
self as pallet_collator_assignment, GetRandomnessForNextBlock,
RotateCollatorsEveryNSessions,
},
frame_support::{
parameter_types,
traits::{ConstU16, ConstU64},
traits::{ConstU16, ConstU64, Hooks},
},
frame_system as system,
parity_scale_codec::{Decode, Encode},
Expand Down

0 comments on commit 5de5bc6

Please sign in to comment.