mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-14 10:22:38 +00:00
spec v0.6.1: attestation processing/verif
This commit is contained in:
@@ -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::*;
|
||||
|
||||
Reference in New Issue
Block a user