block-validation-geth icon indicating copy to clipboard operation
block-validation-geth copied to clipboard

Minor error handling improvment for ValidatePayload

Open michaelneuder opened this issue 2 years ago • 1 comments

In ValidatePayload, we call bc.validator.ValidateBody which is defined here. That function returns an error ErrKnownBlock if the block that we are validating is already part of the canonical chain. By definition, this implies that the block is valid, and thus it feels cleaner to ignore this error.

michaelneuder avatar Feb 25 '23 14:02 michaelneuder

On the other hand, why would we want to accept a block that is already a part of the chain? I will be rejected if anyone tries to propose it again,

Ruteri avatar Mar 07 '23 12:03 Ruteri