mirror of
https://github.com/sigp/lighthouse.git
synced 2026-04-17 04:48:21 +00:00
ContextDeserialize and Beacon API Improvements (#7372)
* #7286 * BeaconAPI is not returning a versioned response when it should for some V1 endpoints * these [strange functions with vX in the name that still accept `endpoint_version` arguments](https://github.com/sigp/lighthouse/blob/stable/beacon_node/http_api/src/produce_block.rs#L192) This refactor is a prerequisite to get the fulu EF tests running.
This commit is contained in:
13
consensus/context_deserialize/src/lib.rs
Normal file
13
consensus/context_deserialize/src/lib.rs
Normal file
@@ -0,0 +1,13 @@
|
||||
pub mod impls;
|
||||
pub mod milhouse;
|
||||
pub mod ssz_impls;
|
||||
|
||||
extern crate serde;
|
||||
use serde::de::Deserializer;
|
||||
|
||||
/// General-purpose deserialization trait that accepts extra context `C`.
|
||||
pub trait ContextDeserialize<'de, C>: Sized {
|
||||
fn context_deserialize<D>(deserializer: D, context: C) -> Result<Self, D::Error>
|
||||
where
|
||||
D: Deserializer<'de>;
|
||||
}
|
||||
Reference in New Issue
Block a user