Fix some single attestation network plumbing

This commit is contained in:
Eitan Seri-Levi
2025-01-07 19:53:00 +07:00
parent e95f00342b
commit 823ddf5e75
10 changed files with 72 additions and 54 deletions

View File

@@ -36,7 +36,6 @@ use std::future::Future;
use std::path::PathBuf;
use std::time::Duration;
use store::fork_versioned_response::ExecutionOptimisticFinalizedForkVersionedResponse;
use types::SingleAttestation;
pub const V1: EndpointVersion = EndpointVersion(1);
pub const V2: EndpointVersion = EndpointVersion(2);

View File

@@ -1160,6 +1160,11 @@ impl<E: EthSpec> EventKind<E> {
"attestation" => Ok(EventKind::Attestation(serde_json::from_str(data).map_err(
|e| ServerError::InvalidServerSentEvent(format!("Attestation: {:?}", e)),
)?)),
"single_attestation" => Ok(EventKind::SingleAttestation(
serde_json::from_str(data).map_err(|e| {
ServerError::InvalidServerSentEvent(format!("SingleAttestation: {:?}", e))
})?,
)),
"block" => Ok(EventKind::Block(serde_json::from_str(data).map_err(
|e| ServerError::InvalidServerSentEvent(format!("Block: {:?}", e)),
)?)),