Snapshot sync improvements (#2960)
* Status packet timeout * Snapshot collection state * Pause snapshot download * Updated tests
This commit is contained in:
committed by
Gav Wood
parent
290ed3343f
commit
9e82eeccfe
@@ -18,6 +18,7 @@ use util::*;
|
||||
use ethcore::client::{TestBlockChainClient, BlockChainClient, BlockID, EachBlockWith};
|
||||
use chain::{SyncState};
|
||||
use super::helpers::*;
|
||||
use SyncConfig;
|
||||
|
||||
#[test]
|
||||
fn two_peers() {
|
||||
@@ -156,6 +157,10 @@ fn restart() {
|
||||
fn status_empty() {
|
||||
let net = TestNet::new(2);
|
||||
assert_eq!(net.peer(0).sync.read().status().state, SyncState::Idle);
|
||||
let mut config = SyncConfig::default();
|
||||
config.warp_sync = true;
|
||||
let net = TestNet::new_with_config(2, config);
|
||||
assert_eq!(net.peer(0).sync.read().status().state, SyncState::WaitingPeers);
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
Reference in New Issue
Block a user