mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-19 21:04:41 +00:00
POST /eth/v2/beacon/pool/attestations bugfixes (#6867)
This commit is contained in:
@@ -327,8 +327,8 @@ impl<T: BeaconChainTypes> VerifiedUnaggregatedAttestation<'_, T> {
|
||||
|
||||
pub fn single_attestation(&self) -> Option<SingleAttestation> {
|
||||
Some(SingleAttestation {
|
||||
committee_index: self.attestation.committee_index()? as usize,
|
||||
attester_index: self.validator_index,
|
||||
committee_index: self.attestation.committee_index()?,
|
||||
attester_index: self.validator_index as u64,
|
||||
data: self.attestation.data().clone(),
|
||||
signature: self.attestation.signature().clone(),
|
||||
})
|
||||
|
||||
@@ -1131,15 +1131,15 @@ where
|
||||
.unwrap();
|
||||
|
||||
let single_attestation =
|
||||
attestation.to_single_attestation_with_attester_index(attester_index)?;
|
||||
attestation.to_single_attestation_with_attester_index(attester_index as u64)?;
|
||||
|
||||
let attestation: Attestation<E> = single_attestation.to_attestation(committee.committee)?;
|
||||
|
||||
assert_eq!(
|
||||
single_attestation.committee_index,
|
||||
attestation.committee_index().unwrap() as usize
|
||||
attestation.committee_index().unwrap()
|
||||
);
|
||||
assert_eq!(single_attestation.attester_index, validator_index);
|
||||
assert_eq!(single_attestation.attester_index, validator_index as u64);
|
||||
Ok(single_attestation)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user