Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix mandala-runtime with dev mode #1718

Merged
merged 2 commits into from
Dec 21, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
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
23 changes: 10 additions & 13 deletions runtime/integration-tests/src/treasury.rs
Original file line number Diff line number Diff line change
Expand Up @@ -274,18 +274,15 @@ mod mandala_only_tests {
// The amount above existential is below the `MinRewardDistributeAmount`.
assert_eq!(
Currencies::free_balance(NATIVE_CURRENCY, &pot_account_id),
100_299_999_998
299_999_999_998
);

CollatorSelection::note_author(AccountId::from(ALICE));
CollatorSelection::note_author(AccountId::from(BOB));
assert_eq!(
Currencies::free_balance(NATIVE_CURRENCY, &pot_account_id),
100_299_999_998
);
assert_eq!(
Currencies::free_balance(NATIVE_CURRENCY, &AccountId::from(ALICE)),
dollar(NATIVE_CURRENCY)
299_999_999_998
);
assert_eq!(Currencies::free_balance(NATIVE_CURRENCY, &AccountId::from(BOB)), 0);

// Put a little more money into the pot
let tip = NegativeImbalance::new(10);
Expand All @@ -296,19 +293,19 @@ mod mandala_only_tests {
// Now the above existential is above the `MinRewardDistributeAmount`.
assert_eq!(
Currencies::free_balance(NATIVE_CURRENCY, &pot_account_id),
100_300_000_000
300_000_000_000
);

// Splits half of 300_000_000 to ALICE
CollatorSelection::note_author(AccountId::from(ALICE));
// Splits half of 300_000_000_000 to BOB
CollatorSelection::note_author(AccountId::from(BOB));

assert_eq!(
Currencies::free_balance(NATIVE_CURRENCY, &pot_account_id),
100_150_000_000
200_000_000_000
);
assert_eq!(
Currencies::free_balance(NATIVE_CURRENCY, &AccountId::from(ALICE)),
dollar(NATIVE_CURRENCY) + 150_000_000
Currencies::free_balance(NATIVE_CURRENCY, &AccountId::from(BOB)),
100_000_000_000
);
});
}
Expand Down
4 changes: 2 additions & 2 deletions runtime/mandala/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -291,8 +291,8 @@ parameter_types! {
pub const MaxInvulnerables: u32 = 50;
pub const KickPenaltySessionLength: u32 = 8;
pub const CollatorKickThreshold: Permill = Permill::from_percent(50);
// 10% of transaction fee of empty remark call: 150_459_200
pub MinRewardDistributeAmount: Balance = 15 * millicent(ACA);
// Ensure that can create the author(`ExistentialDeposit`) with dev mode.
pub MinRewardDistributeAmount: Balance = NativeTokenExistentialDeposit::get();
}

impl module_collator_selection::Config for Runtime {
Expand Down