spec v0.6.1: attestation processing/verif

This commit is contained in:
Michael Sproul
2019-05-21 16:38:16 +10:00
parent f8d4e742ad
commit 0b2aa26f2d
7 changed files with 227 additions and 298 deletions

View File

@@ -1,5 +1,5 @@
use crate::test_utils::TestRandom;
use crate::{Attestation, AttestationData, Bitfield};
use crate::{AttestationData, Bitfield};
use serde_derive::{Deserialize, Serialize};
use ssz_derive::{Decode, Encode};
@@ -28,22 +28,6 @@ pub struct PendingAttestation {
pub proposer_index: u64,
}
impl PendingAttestation {
/// Create a `PendingAttestation` from an `Attestation`.
pub fn from_attestation(
attestation: &Attestation,
inclusion_delay: u64,
proposer_index: u64,
) -> Self {
PendingAttestation {
data: attestation.data.clone(),
aggregation_bitfield: attestation.aggregation_bitfield.clone(),
inclusion_delay,
proposer_index,
}
}
}
#[cfg(test)]
mod tests {
use super::*;