Skip to content

Commit

Permalink
Ignore PreGenesis Messages Instead Of Rejecting Them (#7550)
Browse files Browse the repository at this point in the history
* ignorePreGenesisMessages

* fix test + handelaar's review

* fix issues

* change back

Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
  • Loading branch information
3 people committed Oct 22, 2020
1 parent 17a08a7 commit 7131cd9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions beacon-chain/sync/subscriber.go
Expand Up @@ -169,10 +169,10 @@ func (s *Service) wrapAndReportValidation(topic string, v pubsub.ValidatorEx) (s
messageFailedValidationCounter.WithLabelValues(topic).Inc()
return pubsub.ValidationReject
}
// Reject any messages received before chainstart.
// Ignore any messages received before chainstart.
if !s.chainStarted {
messageFailedValidationCounter.WithLabelValues(topic).Inc()
return pubsub.ValidationReject
return pubsub.ValidationIgnore
}
b := v(ctx, pid, msg)
if b == pubsub.ValidationReject {
Expand Down
2 changes: 1 addition & 1 deletion beacon-chain/sync/subscriber_test.go
Expand Up @@ -280,7 +280,7 @@ func Test_wrapAndReportValidation(t *testing.T) {
},
chainstarted: false,
},
want: pubsub.ValidationReject,
want: pubsub.ValidationIgnore,
},
{
name: "validator panicked",
Expand Down

0 comments on commit 7131cd9

Please sign in to comment.