Fixing sync test

This commit is contained in:
Tomasz Drwięga 2016-03-17 10:20:35 +01:00 committed by arkpar
parent b0d7d48391
commit 4be4a1c151

View File

@ -1320,6 +1320,7 @@ mod tests {
use ::SyncConfig; use ::SyncConfig;
use util::*; use util::*;
use super::{PeerInfo, PeerAsking}; use super::{PeerInfo, PeerAsking};
use ethcore::views::BlockView;
use ethcore::header::*; use ethcore::header::*;
use ethcore::client::*; use ethcore::client::*;
use ethminer::{Miner, MinerService}; use ethminer::{Miner, MinerService};
@ -1650,6 +1651,13 @@ mod tests {
let good_blocks = vec![client.block_hash_delta_minus(2)]; let good_blocks = vec![client.block_hash_delta_minus(2)];
let retracted_blocks = vec![client.block_hash_delta_minus(1)]; let retracted_blocks = vec![client.block_hash_delta_minus(1)];
// Add some balance to clients
for h in vec![good_blocks[0], retracted_blocks[0]] {
let block = client.block(BlockId::Hash(h)).unwrap();
let view = BlockView::new(&block);
client.set_balance(view.transactions()[0].sender().unwrap(), U256::from(10_000));
}
let mut queue = VecDeque::new(); let mut queue = VecDeque::new();
let mut io = TestIo::new(&mut client, &mut queue, None); let mut io = TestIo::new(&mut client, &mut queue, None);