mirror of
https://github.com/sigp/lighthouse.git
synced 2026-06-29 10:54:24 +00:00
Fix SSZ encode impl for fixed_len_vec
This commit is contained in:
@@ -59,6 +59,14 @@ where
|
|||||||
true
|
true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn ssz_fixed_len() -> usize {
|
||||||
|
if <Self as ssz::Encodable>::is_ssz_fixed_len() {
|
||||||
|
T::ssz_fixed_len() * N::to_usize()
|
||||||
|
} else {
|
||||||
|
ssz::BYTES_PER_LENGTH_OFFSET
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
fn ssz_append(&self, buf: &mut Vec<u8>) {
|
fn ssz_append(&self, buf: &mut Vec<u8>) {
|
||||||
if T::is_ssz_fixed_len() {
|
if T::is_ssz_fixed_len() {
|
||||||
buf.reserve(T::ssz_fixed_len() * self.len());
|
buf.reserve(T::ssz_fixed_len() * self.len());
|
||||||
|
|||||||
Reference in New Issue
Block a user