Fix test warnings.

This commit is contained in:
Gav Wood 2016-01-09 18:26:35 +01:00
parent 4622882fda
commit 71670e6277
3 changed files with 5 additions and 12 deletions

View File

@ -123,7 +123,7 @@ impl<'engine> OpenBlock<'engine> {
}
}
/// Turn this into a `ClosedBlock`. A BlockChain must be provided in order to figure ou the uncles.
/// Turn this into a `ClosedBlock`. A BlockChain must be provided in order to figure out the uncles.
pub fn close(self, _uncles: Vec<Header>) -> ClosedBlock<'engine> { unimplemented!(); }
}
@ -155,11 +155,10 @@ impl IsBlock for SealedBlock {
#[test]
fn open_block() {
use super::*;
use spec::*;
let engine = Spec::new_test().to_engine().unwrap();
let genesis_header = engine.spec().genesis_header();
let mut db = OverlayDB::new_temp();
engine.spec().ensure_db_good(&mut db);
let b = OpenBlock::new(engine.deref(), db, &genesis_header, vec![genesis_header.hash()]);
let _ = OpenBlock::new(engine.deref(), db, &genesis_header, vec![genesis_header.hash()]);
}

View File

@ -31,16 +31,10 @@ impl Engine for Ethash {
#[test]
fn playpen() {
use super::*;
use state::*;
let engine = new_morden().to_engine().unwrap();
let genesis_header = engine.spec().genesis_header();
let mut db = OverlayDB::new_temp();
engine.spec().ensure_db_good(&mut db);
assert!(SecTrieDB::new(&db, &genesis_header.state_root).contains(&address_from_hex("102e61f5d8f9bc71d0ad4a084df4e65e05ce0e1c")));
{
let s = State::from_existing(db.clone(), genesis_header.state_root.clone(), engine.account_start_nonce());
assert_eq!(s.balance(&address_from_hex("0000000000000000000000000000000000000001")), U256::from(1u64));
}
let b = OpenBlock::new(engine.deref(), db, &genesis_header, vec![genesis_header.hash()]);
let _ = OpenBlock::new(engine.deref(), db, &genesis_header, vec![genesis_header.hash()]);
// let c = b.close();
}

View File

@ -56,7 +56,7 @@ mod tests {
let genesis = morden.genesis_block();
assert_eq!(BlockView::new(&genesis).header_view().sha3(), H256::from_str("0cd786a2425d16f152c658316c423e6ce1181e15c3295826d7c9904cba9ce303").unwrap());
morden.to_engine();
let _ = morden.to_engine();
}
#[test]
@ -67,6 +67,6 @@ mod tests {
let genesis = frontier.genesis_block();
assert_eq!(BlockView::new(&genesis).header_view().sha3(), H256::from_str("d4e56740f876aef8c010b86a40d5f56745a118d0906a34e69aec8c0db1cb8fa3").unwrap());
frontier.to_engine();
let _ = frontier.to_engine();
}
}