Skip to content

Commit

Permalink
forgot cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
neutrinoks committed Nov 2, 2023
1 parent 6eccc60 commit cb438ff
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 19 deletions.
30 changes: 15 additions & 15 deletions pallets/block-reward/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -161,9 +161,9 @@ pub fn set_block_issue_reward_is_ok() {
let reward = 3_123_456 as Balance;
// custom config so it differs from the default one
assert_ok!(BlockReward::set_block_issue_reward(RuntimeOrigin::root(), reward));
System::assert_last_event(RuntimeEvent::BlockReward(
Event::BlockIssueRewardChanged(reward),
));
System::assert_last_event(RuntimeEvent::BlockReward(Event::BlockIssueRewardChanged(
reward,
)));

assert_eq!(BlockIssueReward::<TestRuntime>::get(), reward);
})
Expand All @@ -185,9 +185,9 @@ pub fn set_maxcurrencysupply_is_ok() {
let limit = 3_123_456 as Balance;
// custom config so it differs from the default one
assert_ok!(BlockReward::set_max_currency_supply(RuntimeOrigin::root(), limit));
System::assert_last_event(RuntimeEvent::BlockReward(
Event::MaxCurrencySupplyChanged(limit),
));
System::assert_last_event(RuntimeEvent::BlockReward(Event::MaxCurrencySupplyChanged(
limit,
)));

assert_eq!(MaxCurrencySupply::<TestRuntime>::get(), limit);
})
Expand Down Expand Up @@ -339,9 +339,9 @@ pub fn averaging_functionality_test() {
});
BlockReward::on_timestamp_set(0);
let amount = txfees.into_iter().sum::<u128>() + ISSUE_NUM;
System::assert_last_event(RuntimeEvent::BlockReward(
Event::BlockRewardsDistributed(amount),
));
System::assert_last_event(RuntimeEvent::BlockReward(Event::BlockRewardsDistributed(
amount,
)));
amount
}

Expand Down Expand Up @@ -383,18 +383,18 @@ pub fn averaging_functionality_test() {
check_avg_storage(BlockReward::hours12_avg_reward, ISSUE_NUM, exp_acc, 1, "hours12:1");
check_avg_storage(BlockReward::daily_avg_reward, ISSUE_NUM, exp_acc, 1, "daily:1");
check_avg_storage(BlockReward::weekly_avg_reward, ISSUE_NUM, exp_acc, 1, "weekly:1");
System::assert_last_event(RuntimeEvent::BlockReward(
Event::BlockRewardsDistributed(ISSUE_NUM + 246),
));
System::assert_last_event(RuntimeEvent::BlockReward(Event::BlockRewardsDistributed(
ISSUE_NUM + 246,
)));

// Do it twice during one block...
exp_acc += do_one_block_event_checked(&vec![62; 2]);
check_avg_storage(BlockReward::hours12_avg_reward, ISSUE_NUM, exp_acc, 2, "hours12:2");
check_avg_storage(BlockReward::daily_avg_reward, ISSUE_NUM, exp_acc, 2, "daily:2");
check_avg_storage(BlockReward::weekly_avg_reward, ISSUE_NUM, exp_acc, 2, "weekly:2");
System::assert_last_event(RuntimeEvent::BlockReward(
Event::BlockRewardsDistributed(ISSUE_NUM + 124),
));
System::assert_last_event(RuntimeEvent::BlockReward(Event::BlockRewardsDistributed(
ISSUE_NUM + 124,
)));

let txfees: Vec<Balance> = vec![1];
let balance = ISSUE_NUM + txfees[0];
Expand Down
2 changes: 1 addition & 1 deletion runtime/agung/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ use frame_system::{
};
use orml_currencies::BasicCurrencyAdapter;
use orml_traits::parameter_type_with_key;
use pallet_block_reward::BeneficiarySelector;
use pallet_ethereum::{Call::transact, Transaction as EthereumTransaction};
use pallet_evm::{
Account as EVMAccount, EnsureAddressTruncated, FeeCalculator, GasWeightMapping,
HashedAddressMapping, Runner,
};
use pallet_block_reward::BeneficiarySelector;
use parachain_staking::reward_rate_config::RewardRateInfo;
use parity_scale_codec::Encode;
use peaq_pallet_did::{did::Did, structs::Attribute as DidAttribute};
Expand Down
2 changes: 1 addition & 1 deletion runtime/krest/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ use frame_system::{
};
use orml_currencies::BasicCurrencyAdapter;
use orml_traits::parameter_type_with_key;
use pallet_block_reward::BeneficiarySelector;
use pallet_ethereum::{Call::transact, Transaction as EthereumTransaction};
use pallet_evm::{
Account as EVMAccount, EnsureAddressTruncated, FeeCalculator, GasWeightMapping,
HashedAddressMapping, Runner,
};
use pallet_block_reward::BeneficiarySelector;
use parachain_staking::reward_rate_config::RewardRateInfo;
use parity_scale_codec::Encode;
use peaq_pallet_did::{did::Did, structs::Attribute as DidAttribute};
Expand Down
2 changes: 1 addition & 1 deletion runtime/peaq-dev/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ use frame_system::{
};
use orml_currencies::BasicCurrencyAdapter;
use orml_traits::parameter_type_with_key;
use pallet_block_reward::BeneficiarySelector;
use pallet_ethereum::{Call::transact, Transaction as EthereumTransaction};
use pallet_evm::{
Account as EVMAccount, EnsureAddressTruncated, FeeCalculator, GasWeightMapping,
HashedAddressMapping, Runner,
};
use pallet_block_reward::BeneficiarySelector;
use parachain_staking::reward_rate_config::RewardRateInfo;
use parity_scale_codec::Encode;
use peaq_pallet_did::{did::Did, structs::Attribute as DidAttribute};
Expand Down
2 changes: 1 addition & 1 deletion runtime/peaq/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ use frame_system::{
};
use orml_currencies::BasicCurrencyAdapter;
use orml_traits::parameter_type_with_key;
use pallet_block_reward::BeneficiarySelector;
use pallet_ethereum::{Call::transact, Transaction as EthereumTransaction};
use pallet_evm::{
Account as EVMAccount, EnsureAddressTruncated, FeeCalculator, GasWeightMapping,
HashedAddressMapping, Runner,
};
use pallet_block_reward::BeneficiarySelector;
use parachain_staking::reward_rate_config::RewardRateInfo;
use parity_scale_codec::Encode;
use peaq_pallet_did::{did::Did, structs::Attribute as DidAttribute};
Expand Down

0 comments on commit cb438ff

Please sign in to comment.