Add more detail to "Prior attestation known" log (#2447)

## Issue Addressed

NA

## Proposed Changes

Adds more detail to the log when an attestation is ignored due to a prior one being known. This will help identify which validators are causing the issue.

## Additional Info

NA
This commit is contained in:
Paul Hauner 2021-07-13 01:02:03 +00:00
parent 20fce117f3
commit 27aec1962c

View File

@ -752,7 +752,10 @@ impl<T: BeaconChainTypes> Worker<T> {
return;
}
AttnError::PriorAttestationKnown { .. } => {
AttnError::PriorAttestationKnown {
validator_index,
epoch,
} => {
/*
* We have already seen an attestation from this validator for this epoch.
*
@ -763,6 +766,8 @@ impl<T: BeaconChainTypes> Worker<T> {
"Prior attestation known";
"peer_id" => %peer_id,
"block" => %beacon_block_root,
"epoch" => %epoch,
"validator_index" => validator_index,
"type" => ?attestation_type,
);
// We still penalize the peer slightly. We don't want this to be a recurring