Update beacon node crates for new SSZ

This commit is contained in:
Paul Hauner
2019-05-13 12:07:32 +10:00
parent d9bfbc2657
commit eb62b5842d
8 changed files with 129 additions and 89 deletions

View File

@@ -25,6 +25,10 @@ pub trait Encodable {
}
}
/// Allow for encoding an ordered series of distinct or indistinct objects as SSZ bytes.
///
/// **You must call `finalize(..)` after the final `append(..)` call** to ensure the bytes are
/// written to `buf`.
pub struct SszEncoder<'a> {
offset: usize,
buf: &'a mut Vec<u8>,