diff --git a/lighthouse/state/attestation_record.rs b/lighthouse/state/attestation_record.rs index e8725cfd7..46f2f9ff4 100644 --- a/lighthouse/state/attestation_record.rs +++ b/lighthouse/state/attestation_record.rs @@ -1,5 +1,6 @@ use super::utils::types::{ Hash256, Bitfield }; use super::utils::bls::{ AggregateSignature }; +use super::ssz::{ Encodable, SszStream }; pub struct AttestationRecord { @@ -11,6 +12,17 @@ pub struct AttestationRecord { pub aggregate_sig: Option, } +impl Encodable for AttestationRecord { + fn ssz_append(&self, s: &mut SszStream) { + s.append(&self.slot); + s.append(&self.shard_id); + s.append_vec(&self.oblique_parent_hashes); + s.append(&self.shard_block_hash); + s.append(&self.attester_bitfield); + // TODO: add aggregate signature + } +} + impl AttestationRecord { pub fn zero() -> Self { Self {