mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2025-01-10 19:51:20 +00:00
Ignore PreGenesis Messages Instead Of Rejecting Them (#7550)
* 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>
This commit is contained in:
parent
17a08a75ea
commit
7131cd991c
@ -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 {
|
||||
|
@ -280,7 +280,7 @@ func Test_wrapAndReportValidation(t *testing.T) {
|
||||
},
|
||||
chainstarted: false,
|
||||
},
|
||||
want: pubsub.ValidationReject,
|
||||
want: pubsub.ValidationIgnore,
|
||||
},
|
||||
{
|
||||
name: "validator panicked",
|
||||
|
Loading…
Reference in New Issue
Block a user