diff --git a/beacon_node/beacon_chain/test_harness/tests/chain.rs b/beacon_node/beacon_chain/test_harness/tests/chain.rs index e72c3a5aa..d47de6889 100644 --- a/beacon_node/beacon_chain/test_harness/tests/chain.rs +++ b/beacon_node/beacon_chain/test_harness/tests/chain.rs @@ -1,3 +1,5 @@ +#![cfg(not(debug_assertions))] + use env_logger::{Builder, Env}; use log::debug; use test_harness::BeaconChainHarness; diff --git a/eth2/fork_choice/tests/tests.rs b/eth2/fork_choice/tests/tests.rs index 3ce63eeb7..fb530ac43 100644 --- a/eth2/fork_choice/tests/tests.rs +++ b/eth2/fork_choice/tests/tests.rs @@ -1,3 +1,4 @@ +#![cfg(not(debug_assertions))] // Tests the available fork-choice algorithms extern crate beacon_chain; diff --git a/eth2/state_processing/tests/tests.rs b/eth2/state_processing/tests/tests.rs index fcd034158..e80340e9a 100644 --- a/eth2/state_processing/tests/tests.rs +++ b/eth2/state_processing/tests/tests.rs @@ -1,6 +1,7 @@ +#![cfg(not(debug_assertions))] + use serde_derive::Deserialize; use serde_yaml; -#[cfg(not(debug_assertions))] use state_processing::{per_block_processing, per_slot_processing}; use std::{fs::File, io::prelude::*, path::PathBuf}; use types::*; diff --git a/eth2/types/src/beacon_block_header.rs b/eth2/types/src/beacon_block_header.rs index fa71bd26b..e4db3a721 100644 --- a/eth2/types/src/beacon_block_header.rs +++ b/eth2/types/src/beacon_block_header.rs @@ -5,7 +5,7 @@ use rand::RngCore; use serde_derive::{Deserialize, Serialize}; use ssz_derive::{Decode, Encode}; use test_random_derive::TestRandom; -use tree_hash::TreeHash; +use tree_hash::{SignedRoot, TreeHash}; use tree_hash_derive::{SignedRoot, TreeHash}; /// A header of a `BeaconBlock`. @@ -37,7 +37,7 @@ impl BeaconBlockHeader { /// /// Spec v0.5.1 pub fn canonical_root(&self) -> Hash256 { - Hash256::from_slice(&self.tree_hash_root()[..]) + Hash256::from_slice(&self.signed_root()[..]) } /// Given a `body`, consumes `self` and returns a complete `BeaconBlock`. diff --git a/eth2/utils/boolean-bitfield/src/lib.rs b/eth2/utils/boolean-bitfield/src/lib.rs index a744c9498..1d0f1c02e 100644 --- a/eth2/utils/boolean-bitfield/src/lib.rs +++ b/eth2/utils/boolean-bitfield/src/lib.rs @@ -9,7 +9,6 @@ use serde_hex::{encode, PrefixedHexVisitor}; use ssz::{Decodable, Encodable}; use std::cmp; use std::default; -use tree_hash::tree_hash_ssz_encoding_as_list; /// A BooleanBitfield represents a set of booleans compactly stored as a vector of bits. /// The BooleanBitfield is given a fixed size during construction. Reads outside of the current size return an out-of-bounds error. Writes outside of the current size expand the size of the set. diff --git a/eth2/utils/ssz_derive/src/lib.rs b/eth2/utils/ssz_derive/src/lib.rs index f3475f5a7..c5b53e934 100644 --- a/eth2/utils/ssz_derive/src/lib.rs +++ b/eth2/utils/ssz_derive/src/lib.rs @@ -38,7 +38,7 @@ extern crate proc_macro; use proc_macro::TokenStream; -use quote::{quote, ToTokens}; +use quote::quote; use syn::{parse_macro_input, DeriveInput}; /// Returns a Vec of `syn::Ident` for each named field in the struct.