Merge pull request #3165 from filecoin-project/fix/validator-ignore-nonce-errors

ignore, don't reject messages with nonce that is too low
This commit is contained in:
Łukasz Magiera 2020-08-20 00:00:20 +02:00 committed by GitHub
commit 6e492e41d1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -546,7 +546,11 @@ func (mv *MessageValidator) Validate(ctx context.Context, pid peer.ID, msg *pubs
) )
stats.Record(ctx, metrics.MessageValidationFailure.M(1)) stats.Record(ctx, metrics.MessageValidationFailure.M(1))
switch { switch {
case xerrors.Is(err, messagepool.ErrBroadcastAnyway) || xerrors.Is(err, messagepool.ErrRBFTooLowPremium): case xerrors.Is(err, messagepool.ErrBroadcastAnyway):
fallthrough
case xerrors.Is(err, messagepool.ErrRBFTooLowPremium):
fallthrough
case xerrors.Is(err, messagepool.ErrNonceTooLow):
return pubsub.ValidationIgnore return pubsub.ValidationIgnore
default: default:
return pubsub.ValidationReject return pubsub.ValidationReject