Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
brenzi committed Aug 28, 2024
1 parent 7cec013 commit 7d84f5b
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions democracy/src/benchmarking.rs
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
use crate::{Pallet as EncointerDemocracy, *};
use encointer_primitives::{
ceremonies::Reputation,
communities::CommunityIdentifier,
democracy::{ProposalState, Tally, Vote},
storage::{current_ceremony_index_key, global_reputation_count, participant_reputation},
ceremonies::Reputation,
communities::CommunityIdentifier,
democracy::{ProposalState, Tally, Vote},
storage::{current_ceremony_index_key, global_reputation_count, participant_reputation},
};
use frame_benchmarking::{account, benchmarks, impl_benchmark_test_suite};
use frame_support::{
assert_ok,
traits::{OnFinalize, OriginTrait},
BoundedVec,
assert_ok,
traits::{OnFinalize, OriginTrait},
BoundedVec,
};
use frame_system::RawOrigin;
use parity_scale_codec::Encode;
#[cfg(not(feature = "std"))]
use sp_std::vec;

fn advance_timestamp_equivalent_to_n_blocks<T: Config>(n: u64) {
let offset: T::Moment = (n * 6000u64)
.try_into()
.unwrap_or_else(|_| panic!("Something went horribly wrong!"));
let new_time: T::Moment = pallet_timestamp::Pallet::<T>::get() + offset;
let _ = pallet_timestamp::Pallet::<T>::set(T::RuntimeOrigin::none(), new_time);
pallet_timestamp::Pallet::<T>::on_finalize(frame_system::Pallet::<T>::block_number());
let offset: T::Moment = (n * 6000u64)
.try_into()
.unwrap_or_else(|_| panic!("Something went horribly wrong!"));
let new_time: T::Moment = pallet_timestamp::Pallet::<T>::get() + offset;
let _ = pallet_timestamp::Pallet::<T>::set(T::RuntimeOrigin::none(), new_time);
pallet_timestamp::Pallet::<T>::on_finalize(frame_system::Pallet::<T>::block_number());
}

benchmarks! {
Expand Down

0 comments on commit 7d84f5b

Please sign in to comment.