Merge branch 'master' into 0.5.1-tests

This commit is contained in:
Paul Hauner 2019-04-17 21:21:07 +10:00
commit 2527252248
No known key found for this signature in database
GPG Key ID: 303E4494BB28068C
6 changed files with 8 additions and 5 deletions

View File

@ -1,3 +1,5 @@
#![cfg(not(debug_assertions))]
use env_logger::{Builder, Env};
use log::debug;
use test_harness::BeaconChainHarness;

View File

@ -1,3 +1,4 @@
#![cfg(not(debug_assertions))]
// Tests the available fork-choice algorithms
extern crate beacon_chain;

View File

@ -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::*;

View File

@ -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`.

View File

@ -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.

View File

@ -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.