mirror of
https://github.com/sigp/lighthouse.git
synced 2026-04-16 12:28:24 +00:00
Fix bug with epoch of attestation votes
This commit is contained in:
@@ -1057,10 +1057,7 @@ impl<T: BeaconChainTypes> BeaconChain<T> {
|
||||
{
|
||||
// Provide the attestation to fork choice, updating the validator latest messages but
|
||||
// _without_ finding and updating the head.
|
||||
if let Err(e) = self
|
||||
.fork_choice
|
||||
.process_attestation(&state, &attestation, block)
|
||||
{
|
||||
if let Err(e) = self.fork_choice.process_attestation(&state, &attestation) {
|
||||
error!(
|
||||
self.log,
|
||||
"Add attestation to fork choice failed";
|
||||
|
||||
@@ -285,7 +285,7 @@ impl<T: BeaconChainTypes> ForkChoice<T> {
|
||||
.backend
|
||||
.contains_block(&attestation.data.beacon_block_root)
|
||||
{
|
||||
self.process_attestation(state, attestation, block)?;
|
||||
self.process_attestation(state, attestation)?;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -311,7 +311,6 @@ impl<T: BeaconChainTypes> ForkChoice<T> {
|
||||
&self,
|
||||
state: &BeaconState<T::EthSpec>,
|
||||
attestation: &Attestation<T::EthSpec>,
|
||||
block: &BeaconBlock<T::EthSpec>,
|
||||
) -> Result<()> {
|
||||
let timer = metrics::start_timer(&metrics::FORK_CHOICE_PROCESS_ATTESTATION_TIMES);
|
||||
|
||||
@@ -340,7 +339,7 @@ impl<T: BeaconChainTypes> ForkChoice<T> {
|
||||
self.backend.process_attestation(
|
||||
validator_index,
|
||||
block_hash,
|
||||
block.slot.epoch(T::EthSpec::slots_per_epoch()),
|
||||
attestation.data.target.epoch,
|
||||
)?;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user