Skip to content

Commit

Permalink
fix evaluator slashing test
Browse files Browse the repository at this point in the history
  • Loading branch information
Lederstrumpf committed Nov 9, 2024
1 parent e552785 commit 669b73b
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions integration-tests/src/tests/evaluator_slash_sideffects.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ use polimec_common::USD_UNIT;
use polimec_runtime::PLMC;
use sp_arithmetic::Perquintill;
use sp_runtime::{FixedU128, MultiAddress::Id};
use xcm::v4::Junction;

generate_accounts!(STASH, ALICE, BOB, CHARLIE, DAVE, ISSUER);

Expand Down Expand Up @@ -77,7 +78,11 @@ fn evaluator_slash_reduces_vesting_schedules() {
vesting_info_4
));

let alice_evaluation = EvaluationParams::<PolimecRuntime>::new(alice.clone(), 35_000 * USD_UNIT);
let alice_evaluation = EvaluationParams::<PolimecRuntime>::new(
alice.clone(),
35_000 * USD_UNIT,
Junction::AccountId32 { network: Some(NetworkId::Polkadot), id: [0u8; 32] },
);
let alice_plmc_evaluated = inst.calculate_evaluation_plmc_spent(vec![alice_evaluation.clone()])[0].plmc_amount;
let alice_slashed = slash_percent * alice_plmc_evaluated;

Expand All @@ -92,7 +97,11 @@ fn evaluator_slash_reduces_vesting_schedules() {
Id(bob.clone()),
vesting_info_5
));
let bob_evaluation = EvaluationParams::<PolimecRuntime>::new(bob.clone(), BOB_EVALUATION * USD_UNIT);
let bob_evaluation = EvaluationParams::<PolimecRuntime>::new(
bob.clone(),
BOB_EVALUATION * USD_UNIT,
Junction::AccountId32 { network: Some(NetworkId::Polkadot), id: [0u8; 32] },
);
let bob_plmc_evaluated = inst.calculate_evaluation_plmc_spent(vec![bob_evaluation.clone()])[0].plmc_amount;
let bob_slashed = slash_percent * bob_plmc_evaluated;

Expand Down

0 comments on commit 669b73b

Please sign in to comment.