mirror of
https://github.com/sigp/lighthouse.git
synced 2026-04-30 19:23:50 +00:00
Gloas HTTP API tests passing
This commit is contained in:
@@ -1939,7 +1939,7 @@ impl<'de, E: EthSpec> ContextDeserialize<'de, ForkName> for FullBlockContents<E>
|
||||
where
|
||||
D: Deserializer<'de>,
|
||||
{
|
||||
if context.deneb_enabled() {
|
||||
if context.deneb_enabled() && !context.gloas_enabled() {
|
||||
Ok(FullBlockContents::BlockContents(
|
||||
BlockContents::context_deserialize::<D>(deserializer, context)?,
|
||||
))
|
||||
@@ -2124,7 +2124,10 @@ impl<E: EthSpec> PublishBlockRequest<E> {
|
||||
impl<E: EthSpec> TryFrom<Arc<SignedBeaconBlock<E>>> for PublishBlockRequest<E> {
|
||||
type Error = &'static str;
|
||||
fn try_from(block: Arc<SignedBeaconBlock<E>>) -> Result<Self, Self::Error> {
|
||||
if block.message().fork_name_unchecked().deneb_enabled() {
|
||||
let fork = block.message().fork_name_unchecked();
|
||||
// Gloas blocks don't carry blobs (execution data comes via envelopes),
|
||||
// so they can be published as block-only requests like pre-Deneb blocks.
|
||||
if fork.deneb_enabled() && !fork.gloas_enabled() {
|
||||
Err("post-Deneb block contents cannot be fully constructed from just the signed block")
|
||||
} else {
|
||||
Ok(PublishBlockRequest::Block(block))
|
||||
|
||||
Reference in New Issue
Block a user