mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-22 22:34:45 +00:00
18 lines
440 B
Rust
18 lines
440 B
Rust
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)?)
|
|
}
|
|
}
|