mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-10 04:01:51 +00:00
Update proposer_slashings and attester_slashings amounts for electra. (#7316)
Did not find a specific issue beside https://github.com/sigp/lighthouse/issues/6821 Leverage `whistleblower_reward_quotient_for_state` to have accurate post-electra `proposer_slashings` and `attester_slashings` fields returned by `/eth/v1/beacon/rewards/blocks/<id>`.
This commit is contained in:
committed by
GitHub
parent
6fad6fba6a
commit
5352d5f78a
@@ -139,7 +139,7 @@ impl<T: BeaconChainTypes> BeaconChain<T> {
|
||||
state
|
||||
.get_validator(proposer_slashing.proposer_index() as usize)?
|
||||
.effective_balance
|
||||
.safe_div(self.spec.whistleblower_reward_quotient)?,
|
||||
.safe_div(self.spec.whistleblower_reward_quotient_for_state(state))?,
|
||||
)?;
|
||||
}
|
||||
|
||||
@@ -161,7 +161,7 @@ impl<T: BeaconChainTypes> BeaconChain<T> {
|
||||
state
|
||||
.get_validator(attester_index as usize)?
|
||||
.effective_balance
|
||||
.safe_div(self.spec.whistleblower_reward_quotient)?,
|
||||
.safe_div(self.spec.whistleblower_reward_quotient_for_state(state))?,
|
||||
)?;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user