mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-22 14:24:44 +00:00
EIP7549 get_attestation_indices (#5657)
* get attesting indices electra impl * fmt * get tests to pass * fmt * fix some beacon chain tests * fmt * fix slasher test * fmt got me again * fix more tests * fix tests
This commit is contained in:
@@ -217,12 +217,11 @@ mod ssz_static {
|
||||
use ef_tests::{Handler, SszStaticHandler, SszStaticTHCHandler, SszStaticWithSpecHandler};
|
||||
use types::blob_sidecar::BlobIdentifier;
|
||||
use types::historical_summary::HistoricalSummary;
|
||||
use types::{LightClientBootstrapAltair, *};
|
||||
use types::{AttesterSlashingBase, AttesterSlashingElectra, LightClientBootstrapAltair, *};
|
||||
|
||||
ssz_static_test!(aggregate_and_proof, AggregateAndProof<_>);
|
||||
ssz_static_test!(attestation, Attestation<_>);
|
||||
ssz_static_test!(attestation_data, AttestationData);
|
||||
ssz_static_test!(attester_slashing, AttesterSlashing<_>);
|
||||
ssz_static_test!(beacon_block, SszStaticWithSpecHandler, BeaconBlock<_>);
|
||||
ssz_static_test!(beacon_block_header, BeaconBlockHeader);
|
||||
ssz_static_test!(beacon_state, SszStaticTHCHandler, BeaconState<_>);
|
||||
@@ -238,7 +237,6 @@ mod ssz_static {
|
||||
ssz_static_test!(indexed_attestation, IndexedAttestation<_>);
|
||||
ssz_static_test!(pending_attestation, PendingAttestation<_>);
|
||||
ssz_static_test!(proposer_slashing, ProposerSlashing);
|
||||
ssz_static_test!(signed_aggregate_and_proof, SignedAggregateAndProof<_>);
|
||||
ssz_static_test!(
|
||||
signed_beacon_block,
|
||||
SszStaticWithSpecHandler,
|
||||
@@ -249,6 +247,24 @@ mod ssz_static {
|
||||
ssz_static_test!(signing_data, SigningData);
|
||||
ssz_static_test!(validator, Validator);
|
||||
ssz_static_test!(voluntary_exit, VoluntaryExit);
|
||||
|
||||
|
||||
#[test]
|
||||
fn signed_aggregate_and_proof() {
|
||||
SszStaticHandler::<AttesterSlashingBase<MinimalEthSpec>, MinimalEthSpec>::pre_electra(
|
||||
)
|
||||
.run();
|
||||
SszStaticHandler::<AttesterSlashingBase<MainnetEthSpec>, MainnetEthSpec>::pre_electra(
|
||||
)
|
||||
.run();
|
||||
SszStaticHandler::<AttesterSlashingElectra<MinimalEthSpec>, MinimalEthSpec>::electra_only(
|
||||
)
|
||||
.run();
|
||||
SszStaticHandler::<AttesterSlashingElectra<MainnetEthSpec>, MainnetEthSpec>::electra_only(
|
||||
)
|
||||
.run();
|
||||
}
|
||||
|
||||
// BeaconBlockBody has no internal indicator of which fork it is for, so we test it separately.
|
||||
#[test]
|
||||
fn beacon_block_body() {
|
||||
@@ -272,6 +288,22 @@ mod ssz_static {
|
||||
.run();
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn signed_aggregate_and_proof() {
|
||||
SszStaticHandler::<SignedAggregateAndProofBase<MinimalEthSpec>, MinimalEthSpec>::pre_electra(
|
||||
)
|
||||
.run();
|
||||
SszStaticHandler::<SignedAggregateAndProofBase<MainnetEthSpec>, MainnetEthSpec>::pre_electra(
|
||||
)
|
||||
.run();
|
||||
SszStaticHandler::<SignedAggregateAndProofElectra<MinimalEthSpec>, MinimalEthSpec>::electra_only(
|
||||
)
|
||||
.run();
|
||||
SszStaticHandler::<SignedAggregateAndProofElectra<MainnetEthSpec>, MainnetEthSpec>::electra_only(
|
||||
)
|
||||
.run();
|
||||
}
|
||||
|
||||
// Altair and later
|
||||
#[test]
|
||||
fn contribution_and_proof() {
|
||||
|
||||
Reference in New Issue
Block a user