From f5d43a684d462059584b59ca3aff69af95cfe0d2 Mon Sep 17 00:00:00 2001 From: Herr Seppia Date: Tue, 2 Jul 2024 17:37:23 +0200 Subject: [PATCH] stake-contract: rename `shifted` event to `suspended` --- contracts/stake/src/state.rs | 2 +- contracts/stake/tests/events.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/contracts/stake/src/state.rs b/contracts/stake/src/state.rs index d34475e48c..92f47b1e69 100644 --- a/contracts/stake/src/state.rs +++ b/contracts/stake/src/state.rs @@ -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, diff --git a/contracts/stake/tests/events.rs b/contracts/stake/tests/events.rs index 389505cbb6..da544b45fb 100644 --- a/contracts/stake/tests/events.rs +++ b/contracts/stake/tests/events.rs @@ -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, @@ -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(()) }