Merge branch 'master' into light-poa

This commit is contained in:
Robert Habermeier
2017-09-04 12:30:37 +02:00
217 changed files with 1613 additions and 1459 deletions

View File

@@ -19,6 +19,7 @@
use std::sync::{Weak, Arc};
use std::collections::BTreeMap;
use std::cmp;
use parking_lot::RwLock;
use util::*;
use ethkey::{recover, public_to_address, Signature};
use account_provider::AccountProvider;
@@ -31,6 +32,7 @@ use evm::Schedule;
use ethjson;
use header::{Header, BlockNumber};
use client::EngineClient;
use semantic_version::SemanticVersion;
use super::signer::EngineSigner;
use super::validator_set::{ValidatorSet, SimpleList, new_validator_set};
@@ -252,6 +254,7 @@ impl Engine for BasicAuthority {
#[cfg(test)]
mod tests {
use std::sync::Arc;
use hash::keccak;
use util::*;
use block::*;
use error::{BlockError, Error};
@@ -308,7 +311,7 @@ mod tests {
#[test]
fn can_generate_seal() {
let tap = AccountProvider::transient_provider();
let addr = tap.insert_account("".sha3().into(), "").unwrap();
let addr = tap.insert_account(keccak("").into(), "").unwrap();
let spec = new_test_authority();
let engine = &*spec.engine;
@@ -326,7 +329,7 @@ mod tests {
#[test]
fn seals_internally() {
let tap = AccountProvider::transient_provider();
let authority = tap.insert_account("".sha3().into(), "").unwrap();
let authority = tap.insert_account(keccak("").into(), "").unwrap();
let engine = new_test_authority().engine;
assert!(!engine.seals_internally().unwrap());