Fixing sync test
This commit is contained in:
parent
10c309fccb
commit
81c36499ea
@ -1301,6 +1301,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};
|
||||||
@ -1631,6 +1632,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);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user