mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-20 13:24:44 +00:00
Allow invalidation of "valid" nodes
This commit is contained in:
@@ -531,15 +531,7 @@ impl ProtoArray {
|
||||
|| latest_valid_ancestor_is_descendant
|
||||
{
|
||||
match &node.execution_status {
|
||||
// It's illegal for an execution client to declare that some previously-valid block
|
||||
// is now invalid. This is a consensus failure on their behalf.
|
||||
ExecutionStatus::Valid(hash) => {
|
||||
return Err(Error::ValidExecutionStatusBecameInvalid {
|
||||
block_root: node.root,
|
||||
payload_block_hash: *hash,
|
||||
})
|
||||
}
|
||||
ExecutionStatus::Optimistic(hash) => {
|
||||
ExecutionStatus::Valid(hash) | ExecutionStatus::Optimistic(hash) => {
|
||||
invalidated_indices.insert(index);
|
||||
node.execution_status = ExecutionStatus::Invalid(*hash);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user