Relove formatting and other issues raise in PR

This commit is contained in:
Kirk Baird 2019-01-17 17:59:33 +11:00
parent 0b47b81a6c
commit 0e3d0848ac
No known key found for this signature in database
GPG Key ID: BF864B7ED0BEA33F
4 changed files with 9 additions and 24 deletions

View File

@ -6,7 +6,6 @@ edition = "2018"
[dependencies]
bls = { path = "../utils/bls" }
bls-aggregates = { git = "https://github.com/sigp/signature-schemes" }
spec = { path = "../spec" }
ssz = { path = "../utils/ssz" }
types = { path = "../types" }

View File

@ -53,7 +53,6 @@ mod tests {
fn test_zero_items() {
let spec = ChainSpec::foundation();
// Note: state_root will not be available without a state (test in beacon_state)
let state_root = Hash256::zero();
let genesis_block = genesis_beacon_block(state_root, &spec);
@ -69,7 +68,6 @@ mod tests {
fn test_beacon_body() {
let spec = ChainSpec::foundation();
// Note: state_root will not be available without a state (test in beacon_state)
let state_root = Hash256::zero();
let genesis_block = genesis_beacon_block(state_root, &spec);
@ -87,7 +85,6 @@ mod tests {
fn test_signature() {
let spec = ChainSpec::foundation();
// Note: state_root will not be available without a state (test in beacon_state)
let state_root = Hash256::zero();
let genesis_block = genesis_beacon_block(state_root, &spec);
@ -97,7 +94,6 @@ mod tests {
let raw_sig = genesis_block.signature.as_raw();
let raw_sig_bytes = raw_sig.as_bytes();
assert!(raw_sig_bytes.len() == 97);
for item in raw_sig_bytes.iter() {
assert!(*item == 0);
}

View File

@ -88,14 +88,11 @@ impl From<ValidatorAssignmentError> for Error {
#[cfg(test)]
mod tests {
extern crate bls;
extern crate validator_induction;
use super::*;
use types::Hash256;
#[test]
fn test_gen_state() {
fn test_genesis_state() {
let spec = ChainSpec::foundation();
let state = genesis_beacon_state(&spec).unwrap();
@ -106,9 +103,8 @@ mod tests {
);
}
// Test Misc
#[test]
fn test_gen_state_misc() {
fn test_genesis_state_misc() {
let spec = ChainSpec::foundation();
let state = genesis_beacon_state(&spec).unwrap();
@ -120,9 +116,8 @@ mod tests {
assert_eq!(state.fork_data.fork_slot, 0);
}
// Test validators
#[test]
fn test_gen_state_validators() {
fn test_genesis_state_validators() {
let spec = ChainSpec::foundation();
let state = genesis_beacon_state(&spec).unwrap();
@ -134,9 +129,8 @@ mod tests {
assert_eq!(state.validator_registry_delta_chain_tip, Hash256::zero());
}
// Test randomness and committees
#[test]
fn test_gen_state_randomness_committees() {
fn test_genesis_state_randomness_committees() {
let spec = ChainSpec::foundation();
let state = genesis_beacon_state(&spec).unwrap();
@ -161,13 +155,11 @@ mod tests {
}
// Custody not implemented until Phase 1
// This test will always pass until Phase 1
#[test]
fn test_gen_state_custody() {}
fn test_genesis_state_custody() {}
// Test finality
#[test]
fn test_gen_state_finanilty() {
fn test_genesis_state_finanilty() {
let spec = ChainSpec::foundation();
let state = genesis_beacon_state(&spec).unwrap();
@ -178,9 +170,8 @@ mod tests {
assert_eq!(state.finalized_slot, 0);
}
// Test recent state
#[test]
fn test_gen_state_recent_state() {
fn test_genesis_state_recent_state() {
let spec = ChainSpec::foundation();
let state = genesis_beacon_state(&spec).unwrap();
@ -211,9 +202,8 @@ mod tests {
assert!(state.batched_block_roots.is_empty());
}
// Test PoW Receipts a.k.a. deposits
#[test]
fn test_gen_state_deposit_root() {
fn test_genesis_state_deposit_root() {
let spec = ChainSpec::foundation();
let state = genesis_beacon_state(&spec).unwrap();

View File

@ -10,7 +10,7 @@ use hashing::canonical_hash;
use rand::RngCore;
use ssz::{ssz_encode, Decodable, DecodeError, Encodable, SszStream};
// Custody will not be added to the specs until Phase 1 (Sharding Phase) so dummay class used.
// Custody will not be added to the specs until Phase 1 (Sharding Phase) so dummy class used.
type CustodyChallenge = usize;
#[derive(Debug, PartialEq, Clone, Default)]