fix some bugx, adjust stucts

This commit is contained in:
Daniel Knopik
2022-09-17 11:26:18 +02:00
parent 8e4e499b51
commit 95203c51d4
20 changed files with 256 additions and 20 deletions

View File

@@ -45,7 +45,7 @@ pub fn slash_validator<T: EthSpec>(
validator_effective_balance.safe_div(spec.whistleblower_reward_quotient)?;
let proposer_reward = match state {
BeaconState::Base(_) => whistleblower_reward.safe_div(spec.proposer_reward_quotient)?,
BeaconState::Altair(_) | BeaconState::Merge(_) => whistleblower_reward
BeaconState::Altair(_) | BeaconState::Merge(_) | BeaconState::Eip4844(_) => whistleblower_reward
.safe_mul(PROPOSER_WEIGHT)?
.safe_div(WEIGHT_DENOMINATOR)?,
};

View File

@@ -230,7 +230,7 @@ pub fn process_attestations<'a, T: EthSpec, Payload: ExecPayload<T>>(
BeaconBlockBodyRef::Base(_) => {
base::process_attestations(state, block_body.attestations(), verify_signatures, spec)?;
}
BeaconBlockBodyRef::Altair(_) | BeaconBlockBodyRef::Merge(_) => {
BeaconBlockBodyRef::Altair(_) | BeaconBlockBodyRef::Merge(_) | BeaconBlockBodyRef::Eip4844(_) => {
altair::process_attestations(
state,
block_body.attestations(),

View File

@@ -37,7 +37,7 @@ pub fn process_epoch<T: EthSpec>(
match state {
BeaconState::Base(_) => base::process_epoch(state, spec),
BeaconState::Altair(_) | BeaconState::Merge(_) => altair::process_epoch(state, spec),
BeaconState::Altair(_) | BeaconState::Merge(_) | BeaconState::Eip4844(_) => altair::process_epoch(state, spec),
}
}