mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-20 13:24:44 +00:00
Add {fork_name}_enabled functions (#5951)
* add fork_name_enabled fn to Forkname impl * refactor codebase to use new fork_enabled fn * fmt * Merge branch 'unstable' of https://github.com/sigp/lighthouse into fork-ord-impl * small code cleanup * resolve merge conflicts * fix beacon chain test * merge conflicts * fix ef test issue * resolve merge conflicts
This commit is contained in:
@@ -11,11 +11,9 @@ pub fn build_block_contents<E: EthSpec>(
|
||||
BeaconBlockResponseWrapper::Blinded(block) => {
|
||||
Ok(ProduceBlockV3Response::Blinded(block.block))
|
||||
}
|
||||
BeaconBlockResponseWrapper::Full(block) => match fork_name {
|
||||
ForkName::Base | ForkName::Altair | ForkName::Bellatrix | ForkName::Capella => Ok(
|
||||
ProduceBlockV3Response::Full(FullBlockContents::Block(block.block)),
|
||||
),
|
||||
ForkName::Deneb | ForkName::Electra => {
|
||||
|
||||
BeaconBlockResponseWrapper::Full(block) => {
|
||||
if fork_name.deneb_enabled() {
|
||||
let BeaconBlockResponse {
|
||||
block,
|
||||
state: _,
|
||||
@@ -37,7 +35,11 @@ pub fn build_block_contents<E: EthSpec>(
|
||||
blobs,
|
||||
}),
|
||||
))
|
||||
} else {
|
||||
Ok(ProduceBlockV3Response::Full(FullBlockContents::Block(
|
||||
block.block,
|
||||
)))
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user