mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-19 21:04:41 +00:00
Move offset_handler construction into self
This commit is contained in:
@@ -4,15 +4,15 @@ use crate::{ssz_encode, Encodable};
|
||||
impl CachedTreeHash for u64 {
|
||||
type Item = Self;
|
||||
|
||||
fn build_cache(&self) -> Result<TreeHashCache, Error> {
|
||||
TreeHashCache::from_bytes(merkleize(ssz_encode(self)))
|
||||
fn leaves_and_subtrees(&self) -> Vec<u8> {
|
||||
merkleize(ssz_encode(self))
|
||||
}
|
||||
|
||||
fn num_bytes(&self) -> usize {
|
||||
8
|
||||
}
|
||||
|
||||
fn offset_handler(&self, _initial_offset: usize) -> Result<OffsetHandler, Error> {
|
||||
fn offsets(&self) -> Result<Vec<usize>, Error> {
|
||||
Err(Error::ShouldNotProduceOffsetHandler)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user