Fix build.
This commit is contained in:
parent
90d3d330f5
commit
b437265082
@ -365,7 +365,7 @@ windows:
|
||||
- set RUSTFLAGS=%RUSTFLAGS%
|
||||
- rustup default stable-x86_64-pc-windows-msvc
|
||||
- cargo build --release #%CARGOFLAGS%
|
||||
- FOR /F "delims=" %i IN ('target\release\parity.exe tools hash target\release\parity.exe') DO set SHA3=%i
|
||||
- FOR /F "tokens=* USEBACKQ" %%i IN ('target\release\parity.exe tools hash target\release\parity.exe') DO set SHA3=%%i
|
||||
- curl -sL --url "https://github.com/ethcore/win-build/raw/master/SimpleFC.dll" -o nsis\SimpleFC.dll
|
||||
- curl -sL --url "https://github.com/ethcore/win-build/raw/master/vc_redist.x64.exe" -o nsis\vc_redist.x64.exe
|
||||
- signtool sign /f %keyfile% /p %certpass% target\release\parity.exe
|
||||
|
@ -2130,16 +2130,35 @@ mod tests {
|
||||
}
|
||||
}
|
||||
|
||||
fn sync_status(state: SyncState) -> SyncStatus {
|
||||
SyncStatus {
|
||||
state: state,
|
||||
protocol_version: 0,
|
||||
network_id: 0,
|
||||
start_block_number: 0,
|
||||
last_imported_block_number: None,
|
||||
highest_block_number: None,
|
||||
blocks_total: 0,
|
||||
blocks_received: 0,
|
||||
num_peers: 0,
|
||||
num_active_peers: 0,
|
||||
mem_used: 0,
|
||||
num_snapshot_chunks: 0,
|
||||
snapshot_chunks_done: 0,
|
||||
last_imported_old_block_number: None,
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn is_still_verifying() {
|
||||
assert!(!is_major_importing(None, queue_info(2, 1)));
|
||||
assert!(is_major_importing(None, queue_info(2, 2)));
|
||||
assert!(!sync_status(SyncState::Idle).is_syncing(queue_info(2, 1)));
|
||||
assert!(sync_status(SyncState::Idle).is_syncing(queue_info(2, 2)));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn is_synced_state() {
|
||||
assert!(is_major_importing(Some(SyncState::Blocks), queue_info(0, 0)));
|
||||
assert!(!is_major_importing(Some(SyncState::Idle), queue_info(0, 0)));
|
||||
assert!(sync_status(SyncState::Blocks).is_syncing(queue_info(0, 0)));
|
||||
assert!(!sync_status(SyncState::Idle).is_syncing(queue_info(0, 0)));
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
Loading…
Reference in New Issue
Block a user