Fixed Clippy Complaints & Some Failing Tests (#3791)

* Fixed Clippy Complaints & Some Failing Tests
* Update Dockerfile to Rust-1.65
* EF test file renamed
* Touch up comments based on feedback
This commit is contained in:
ethDreamer
2022-12-13 10:50:24 -06:00
committed by GitHub
parent 173a0abab4
commit b1c33361ea
15 changed files with 79 additions and 49 deletions

View File

@@ -29,7 +29,7 @@ pub struct MerkleProofValidity<E: EthSpec> {
impl<E: EthSpec> LoadCase for MerkleProofValidity<E> {
fn load_from_dir(path: &Path, fork_name: ForkName) -> Result<Self, Error> {
let spec = &testing_spec::<E>(fork_name);
let state = ssz_decode_state(&path.join("state.ssz_snappy"), spec)?;
let state = ssz_decode_state(&path.join("object.ssz_snappy"), spec)?;
let merkle_proof = yaml_decode_file(&path.join("proof.yaml"))?;
// Metadata does not exist in these tests but it is left like this just in case.
let meta_path = path.join("meta.yaml");

View File

@@ -21,8 +21,6 @@ use state_processing::{
ConsensusContext,
};
use std::fmt::Debug;
#[cfg(not(all(feature = "withdrawals", feature = "withdrawals-processing")))]
use std::marker::PhantomData;
use std::path::Path;
#[cfg(all(feature = "withdrawals", feature = "withdrawals-processing"))]
use types::SignedBlsToExecutionChange;
@@ -44,12 +42,10 @@ struct ExecutionMetadata {
}
/// Newtype for testing withdrawals.
#[cfg(all(feature = "withdrawals", feature = "withdrawals-processing"))]
#[derive(Debug, Clone, Deserialize)]
pub struct WithdrawalsPayload<T: EthSpec> {
#[cfg(all(feature = "withdrawals", feature = "withdrawals-processing"))]
payload: FullPayload<T>,
#[cfg(not(all(feature = "withdrawals", feature = "withdrawals-processing")))]
_phantom_data: PhantomData<T>,
}
#[derive(Debug, Clone)]

View File

@@ -1,9 +1,11 @@
pub use case_result::CaseResult;
#[cfg(all(feature = "withdrawals", feature = "withdrawals-processing"))]
pub use cases::WithdrawalsPayload;
pub use cases::{
Case, EffectiveBalanceUpdates, Eth1DataReset, HistoricalRootsUpdate, InactivityUpdates,
JustificationAndFinalization, ParticipationFlagUpdates, ParticipationRecordUpdates,
RandaoMixesReset, RegistryUpdates, RewardsAndPenalties, Slashings, SlashingsReset,
SyncCommitteeUpdates, WithdrawalsPayload,
SyncCommitteeUpdates,
};
pub use decode::log_file_access;
pub use error::Error;