2019-05-20 08:01:51 +00:00
|
|
|
use crate::*;
|
|
|
|
use ssz::{Decode, Encode};
|
|
|
|
|
2019-06-04 03:13:58 +00:00
|
|
|
mod beacon_state;
|
|
|
|
|
2019-05-20 08:01:51 +00:00
|
|
|
impl StoreItem for BeaconBlock {
|
|
|
|
fn db_column() -> DBColumn {
|
|
|
|
DBColumn::BeaconBlock
|
|
|
|
}
|
|
|
|
|
|
|
|
fn as_store_bytes(&self) -> Vec<u8> {
|
|
|
|
self.as_ssz_bytes()
|
|
|
|
}
|
|
|
|
|
|
|
|
fn from_store_bytes(bytes: &mut [u8]) -> Result<Self, Error> {
|
|
|
|
Self::from_ssz_bytes(bytes).map_err(Into::into)
|
|
|
|
}
|
|
|
|
}
|