fixed loading of executive tests, unrevealed failing consensus tests

This commit is contained in:
debris
2016-03-24 01:25:59 +01:00
parent 3352b0e916
commit 1aa34e9dd4
16 changed files with 240 additions and 93 deletions

View File

@@ -28,7 +28,7 @@ pub fn json_chain_test(json_data: &[u8], era: ChainEra) -> Vec<String> {
let tests = ethjson::blockchain::Test::load(json_data).unwrap();
let mut failed = Vec::new();
for (name, blockchain) in tests.deref() {
for (name, blockchain) in tests.into_iter() {
let mut fail = false;
{
let mut fail_unless = |cond: bool| if !cond && !fail {
@@ -61,7 +61,7 @@ pub fn json_chain_test(json_data: &[u8], era: ChainEra) -> Vec<String> {
client.import_verified_blocks(&IoChannel::disconnected());
}
}
fail_unless(client.chain_info().best_block_hash == blockchain.best_block.clone().into());
fail_unless(client.chain_info().best_block_hash == blockchain.best_block.into());
}
}