mirror of
https://github.com/sigp/lighthouse.git
synced 2026-04-17 12:58:31 +00:00
superstruct the AttesterSlashing (#5636)
* `superstruct` Attester Fork Variants * Push a little further * Deal with Encode / Decode of AttesterSlashing * not so sure about this.. * Stop Encode/Decode Bounds from Propagating Out * Tons of Changes.. * More Conversions to AttestationRef * Add AsReference trait (#15) * Add AsReference trait * Fix some snafus * Got it Compiling! :D * Got Tests Building * Get beacon chain tests compiling --------- Co-authored-by: Michael Sproul <micsproul@gmail.com>
This commit is contained in:
@@ -17,11 +17,11 @@ fn error(reason: Invalid) -> BlockOperationError<Invalid> {
|
||||
/// Optionally verifies the aggregate signature, depending on `verify_signatures`.
|
||||
pub fn verify_attestation_for_block_inclusion<'ctxt, E: EthSpec>(
|
||||
state: &BeaconState<E>,
|
||||
attestation: &Attestation<E>,
|
||||
attestation: AttestationRef<'ctxt, E>,
|
||||
ctxt: &'ctxt mut ConsensusContext<E>,
|
||||
verify_signatures: VerifySignatures,
|
||||
spec: &ChainSpec,
|
||||
) -> Result<&'ctxt IndexedAttestation<E>> {
|
||||
) -> Result<IndexedAttestationRef<'ctxt, E>> {
|
||||
let data = attestation.data();
|
||||
|
||||
verify!(
|
||||
@@ -61,11 +61,11 @@ pub fn verify_attestation_for_block_inclusion<'ctxt, E: EthSpec>(
|
||||
/// Spec v0.12.1
|
||||
pub fn verify_attestation_for_state<'ctxt, E: EthSpec>(
|
||||
state: &BeaconState<E>,
|
||||
attestation: &Attestation<E>,
|
||||
attestation: AttestationRef<'ctxt, E>,
|
||||
ctxt: &'ctxt mut ConsensusContext<E>,
|
||||
verify_signatures: VerifySignatures,
|
||||
spec: &ChainSpec,
|
||||
) -> Result<&'ctxt IndexedAttestation<E>> {
|
||||
) -> Result<IndexedAttestationRef<'ctxt, E>> {
|
||||
let data = attestation.data();
|
||||
|
||||
verify!(
|
||||
@@ -87,7 +87,7 @@ pub fn verify_attestation_for_state<'ctxt, E: EthSpec>(
|
||||
///
|
||||
/// Spec v0.12.1
|
||||
fn verify_casper_ffg_vote<E: EthSpec>(
|
||||
attestation: &Attestation<E>,
|
||||
attestation: AttestationRef<E>,
|
||||
state: &BeaconState<E>,
|
||||
) -> Result<()> {
|
||||
let data = attestation.data();
|
||||
|
||||
Reference in New Issue
Block a user