fixed loading of executive tests, unrevealed failing consensus tests
This commit is contained in:
@@ -17,7 +17,6 @@
|
||||
//! Blockchain test state deserializer.
|
||||
|
||||
use std::collections::BTreeMap;
|
||||
use std::ops::Deref;
|
||||
use hash::Address;
|
||||
use blockchain::account::Account;
|
||||
|
||||
@@ -25,10 +24,11 @@ use blockchain::account::Account;
|
||||
#[derive(Debug, PartialEq, Deserialize, Clone)]
|
||||
pub struct State(pub BTreeMap<Address, Account>);
|
||||
|
||||
impl Deref for State {
|
||||
type Target = BTreeMap<Address, Account>;
|
||||
impl IntoIterator for State {
|
||||
type Item = <BTreeMap<Address, Account> as IntoIterator>::Item;
|
||||
type IntoIter = <BTreeMap<Address, Account> as IntoIterator>::IntoIter;
|
||||
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
fn into_iter(self) -> Self::IntoIter {
|
||||
self.0.into_iter()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
//! Blockchain test deserializer.
|
||||
|
||||
use std::collections::BTreeMap;
|
||||
use std::ops::Deref;
|
||||
use std::io::Read;
|
||||
use serde_json;
|
||||
use serde_json::Error;
|
||||
@@ -27,11 +26,12 @@ use blockchain::blockchain::BlockChain;
|
||||
#[derive(Debug, PartialEq, Deserialize)]
|
||||
pub struct Test(BTreeMap<String, BlockChain>);
|
||||
|
||||
impl Deref for Test {
|
||||
type Target = BTreeMap<String, BlockChain>;
|
||||
impl IntoIterator for Test {
|
||||
type Item = <BTreeMap<String, BlockChain> as IntoIterator>::Item;
|
||||
type IntoIter = <BTreeMap<String, BlockChain> as IntoIterator>::IntoIter;
|
||||
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
fn into_iter(self) -> Self::IntoIter {
|
||||
self.0.into_iter()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user