mirror of
https://github.com/sigp/lighthouse.git
synced 2026-04-19 05:48:31 +00:00
Encode bitfield as list not vector
This commit is contained in:
@@ -9,7 +9,7 @@ use serde_hex::{encode, PrefixedHexVisitor};
|
||||
use ssz::{Decodable, Encodable};
|
||||
use std::cmp;
|
||||
use std::default;
|
||||
use tree_hash::impl_tree_hash_for_ssz_bytes;
|
||||
use tree_hash::tree_hash_ssz_encoding_as_list;
|
||||
|
||||
/// A BooleanBitfield represents a set of booleans compactly stored as a vector of bits.
|
||||
/// The BooleanBitfield is given a fixed size during construction. Reads outside of the current size return an out-of-bounds error. Writes outside of the current size expand the size of the set.
|
||||
@@ -257,7 +257,7 @@ impl<'de> Deserialize<'de> for BooleanBitfield {
|
||||
}
|
||||
}
|
||||
|
||||
impl_tree_hash_for_ssz_bytes!(BooleanBitfield);
|
||||
tree_hash_ssz_encoding_as_list!(BooleanBitfield);
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
|
||||
Reference in New Issue
Block a user