This commit is contained in:
Danny Ryan 2022-03-22 08:14:38 -06:00
parent c10d219664
commit a2db44693b
No known key found for this signature in database
GPG Key ID: 2765A792E42CE07A
2 changed files with 9 additions and 2 deletions

View File

@ -34,7 +34,7 @@ def notify_forkchoice_updated(self: ExecutionEngine,
head_block_hash: Hash32,
safe_block_hash: Hash32,
finalized_block_hash: Hash32,
payload_attributes: Optional[PayloadAttributes]) -> Optional[PayloadId]: # new in Capella
payload_attributes: Optional[PayloadAttributes]) -> Optional[PayloadId]:
...
```

View File

@ -87,5 +87,12 @@ def prepare_execution_payload(state: BeaconState,
suggested_fee_recipient=suggested_fee_recipient,
withdrawals=get_expected_withdrawals(state), # [New in Capella]
)
return execution_engine.notify_forkchoice_updated(parent_hash, finalized_block_hash, payload_attributes)
# Set safe and head block hashes to the same value
return execution_engine.notify_forkchoice_updated(
head_block_hash=parent_hash,
# TODO: Use `parent_hash` as a stub for now.
safe_block_hash=parent_hash,
finalized_block_hash=finalized_block_hash,
payload_attributes=payload_attributes,
)
```