Reconstruct Payloads using Payload Bodies Methods (#4028)

## Issue Addressed

* #3895 

Co-authored-by: ethDreamer <37123614+ethDreamer@users.noreply.github.com>
Co-authored-by: Michael Sproul <michael@sigmaprime.io>
This commit is contained in:
ethDreamer
2023-03-19 23:15:59 +00:00
parent 020fb483fe
commit 65a5eb8292
18 changed files with 1335 additions and 33 deletions

View File

@@ -152,3 +152,12 @@ impl<T: EthSpec> ForkVersionDeserialize for ExecutionPayload<T> {
})
}
}
impl<T: EthSpec> ExecutionPayload<T> {
pub fn fork_name(&self) -> ForkName {
match self {
ExecutionPayload::Merge(_) => ForkName::Merge,
ExecutionPayload::Capella(_) => ForkName::Capella,
}
}
}