mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-10 20:22:02 +00:00
1.1.5 merge spec tests (#2781)
* Fix arbitrary check kintsugi * Add merge chain spec fields, and a function to determine which constant to use based on the state variant * increment spec test version * Remove `Transaction` enum wrapper * Remove Transaction new-type * Remove gas validations * Add `--terminal-block-hash-epoch-override` flag * Increment spec tests version to 1.1.5 * Remove extraneous gossip verification https://github.com/ethereum/consensus-specs/pull/2687 * - Remove unused Error variants - Require both "terminal-block-hash-epoch-override" and "terminal-block-hash-override" when either flag is used * - Remove a couple more unused Error variants Co-authored-by: Paul Hauner <paul@paulhauner.com>
This commit is contained in:
@@ -31,14 +31,11 @@ pub fn slash_validator<T: EthSpec>(
|
||||
.safe_add(validator_effective_balance)?,
|
||||
)?;
|
||||
|
||||
let min_slashing_penalty_quotient = match state {
|
||||
BeaconState::Base(_) => spec.min_slashing_penalty_quotient,
|
||||
BeaconState::Altair(_) | BeaconState::Merge(_) => spec.min_slashing_penalty_quotient_altair,
|
||||
};
|
||||
decrease_balance(
|
||||
state,
|
||||
slashed_index,
|
||||
validator_effective_balance.safe_div(min_slashing_penalty_quotient)?,
|
||||
validator_effective_balance
|
||||
.safe_div(spec.min_slashing_penalty_quotient_for_state(state))?,
|
||||
)?;
|
||||
|
||||
// Apply proposer and whistleblower rewards
|
||||
|
||||
Reference in New Issue
Block a user