mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-15 19:02:42 +00:00
Add enc/decode traits to store
This commit is contained in:
16
beacon_node/db2/src/impls.rs
Normal file
16
beacon_node/db2/src/impls.rs
Normal file
@@ -0,0 +1,16 @@
|
||||
/*
|
||||
use types::*;
|
||||
|
||||
impl StoreEncode for Hash256 {
|
||||
fn as_store_bytes(&self) -> Vec<u8> {
|
||||
self.as_bytes().to_vec()
|
||||
}
|
||||
}
|
||||
|
||||
impl StoreDecode for Hash256 {
|
||||
fn from_store_bytes(bytes: &mut [u8]) -> Vec<u8> {
|
||||
Hash256::from_slice()
|
||||
self.as_bytes().to_vec()
|
||||
}
|
||||
}
|
||||
*/
|
||||
Reference in New Issue
Block a user