Ensure VALID response from fcU updates protoarray (#3126)

## Issue Addressed

NA

## Proposed Changes

Ensures that a `VALID` response from a `forkchoiceUpdate` call will update that block in `ProtoArray`.

I also had to modify the mock execution engine so it wouldn't return valid when all payloads were supposed to be some other static value.

## Additional Info

NA
This commit is contained in:
Paul Hauner
2022-04-05 20:58:17 +00:00
parent 42cdaf5840
commit 8a40763183
7 changed files with 121 additions and 5 deletions

View File

@@ -188,6 +188,16 @@ impl ProtoArrayForkChoice {
})
}
/// See `ProtoArray::propagate_execution_payload_validation` for documentation.
pub fn process_execution_payload_validation(
&mut self,
block_root: Hash256,
) -> Result<(), String> {
self.proto_array
.propagate_execution_payload_validation(block_root)
.map_err(|e| format!("Failed to process valid payload: {:?}", e))
}
/// See `ProtoArray::propagate_execution_payload_invalidation` for documentation.
pub fn process_execution_payload_invalidation(
&mut self,