mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-22 06:14:38 +00:00
Merge remote-tracking branch 'origin/unstable' into tree-states
This commit is contained in:
17
beacon_node/store/src/impls/execution_payload.rs
Normal file
17
beacon_node/store/src/impls/execution_payload.rs
Normal file
@@ -0,0 +1,17 @@
|
||||
use crate::{DBColumn, Error, StoreItem};
|
||||
use ssz::{Decode, Encode};
|
||||
use types::{EthSpec, ExecutionPayload};
|
||||
|
||||
impl<E: EthSpec> StoreItem for ExecutionPayload<E> {
|
||||
fn db_column() -> DBColumn {
|
||||
DBColumn::ExecPayload
|
||||
}
|
||||
|
||||
fn as_store_bytes(&self) -> Result<Vec<u8>, Error> {
|
||||
Ok(self.as_ssz_bytes())
|
||||
}
|
||||
|
||||
fn from_store_bytes(bytes: &[u8]) -> Result<Self, Error> {
|
||||
Ok(Self::from_ssz_bytes(bytes)?)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user