block-validation-geth
block-validation-geth copied to clipboard
Minor error handling improvment for ValidatePayload
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.
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,