mirror of
https://github.com/sigp/lighthouse.git
synced 2026-04-21 14:58:31 +00:00
Change ssz to use extend_from_slice()
This is instead of `append` which empties the source vector. This doens't really ssem suitable for what we're doing.
This commit is contained in:
@@ -18,7 +18,7 @@ impl Encodable for AttestationRecord {
|
||||
s.append(&self.shard_id);
|
||||
s.append_vec(&self.oblique_parent_hashes);
|
||||
s.append(&self.shard_block_hash);
|
||||
s.append(&self.attester_bitfield);
|
||||
s.append_vec(&self.attester_bitfield.to_be_vec());
|
||||
// TODO: add aggregate signature
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47,11 +47,10 @@ impl Block {
|
||||
|
||||
impl Encodable for Block {
|
||||
fn ssz_append(&self, s: &mut SszStream) {
|
||||
let mut s = SszStream::new();
|
||||
s.append(&self.parent_hash);
|
||||
s.append(&self.slot_number);
|
||||
s.append(&self.randao_reveal);
|
||||
s.append(&self.attestations);
|
||||
s.append_vec(&self.attestations);
|
||||
s.append(&self.pow_chain_ref);
|
||||
s.append(&self.active_state_root);
|
||||
s.append(&self.crystallized_state_root);
|
||||
|
||||
Reference in New Issue
Block a user