Skip to content

Commit

Permalink
Merge pull request #3200 from dusk-network/relax_hard_slash
Browse files Browse the repository at this point in the history
stake-contract: relax hard-slash to soft-slash
  • Loading branch information
fed-franz authored Dec 18, 2024
2 parents 88d8018 + 2f4b6d8 commit c35d6d3
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions rusk/src/lib/node/rusk.rs
Original file line number Diff line number Diff line change
Expand Up @@ -930,19 +930,23 @@ fn slash(session: &mut Session, slash: Vec<Slash>) -> Result<Vec<Event>> {
&(provisioner, None::<u64>),
u64::MAX,
),
// INFO: Hard Slashing is currently "relaxed" to Soft Slashing as a
// safety measure for the initial period after mainnet launch.
// Proper behavior should be restored in the future
node_data::ledger::SlashType::Hard => session.call::<_, ()>(
STAKE_CONTRACT,
"hard_slash",
&(provisioner, None::<u64>, None::<u8>),
"slash",
&(provisioner, None::<u64>),
u64::MAX,
),
node_data::ledger::SlashType::HardWithSeverity(severity) => session
.call::<_, ()>(
node_data::ledger::SlashType::HardWithSeverity(_severity) => {
session.call::<_, ()>(
STAKE_CONTRACT,
"hard_slash",
&(provisioner, None::<u64>, Some(severity)),
"slash",
&(provisioner, None::<u64>),
u64::MAX,
),
)
}
}?;
events.extend(r.events);
}
Expand Down

0 comments on commit c35d6d3

Please sign in to comment.