Skip to content

Commit

Permalink
stake-contract: rename shifted event to suspended
Browse files Browse the repository at this point in the history
  • Loading branch information
herr-seppia committed Jul 2, 2024
1 parent 6c3ef0e commit f5d43a6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion contracts/stake/src/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ impl StakeState {
let to_shift = effective_faults * EPOCH;
*eligibility = next_epoch(rusk_abi::block_height()) + to_shift;
rusk_abi::emit(
"shifted",
"suspended",
StakingEvent {
public_key: *stake_pk,
value: *eligibility,
Expand Down
4 changes: 2 additions & 2 deletions contracts/stake/tests/events.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ fn reward_slash() -> Result<(), Error> {
// 10% of current amount
let slash_amount = stake_amount / 10;
assert_event(&receipt.events, "slash", &stake_pk, slash_amount);
assert_event(&receipt.events, "shifted", &stake_pk, 4320);
assert_event(&receipt.events, "suspended", &stake_pk, 4320);

let receipt = session.call::<_, ()>(
STAKE_CONTRACT,
Expand All @@ -100,7 +100,7 @@ fn reward_slash() -> Result<(), Error> {
// 20% of current amount
let slash_amount = stake_amount / 100 * 20;
assert_event(&receipt.events, "slash", &stake_pk, slash_amount);
assert_event(&receipt.events, "shifted", &stake_pk, 6480);
assert_event(&receipt.events, "suspended", &stake_pk, 6480);

Ok(())
}
Expand Down

0 comments on commit f5d43a6

Please sign in to comment.