Fix more build.

This commit is contained in:
Gav Wood 2016-12-04 10:47:05 -08:00
parent 356aca2db5
commit b8c492644b
No known key found for this signature in database
GPG Key ID: C49C1ACA1CC9B252
2 changed files with 5 additions and 4 deletions

View File

@ -689,6 +689,9 @@ mod tests {
mode: Some("dark".into()), mode: Some("dark".into()),
mode_timeout: Some(15u64), mode_timeout: Some(15u64),
mode_alarm: Some(10u64), mode_alarm: Some(10u64),
auto_update: None,
no_download: None,
no_consensus: None,
chain: Some("./chain.json".into()), chain: Some("./chain.json".into()),
db_path: None, db_path: None,
keys_path: None, keys_path: None,

View File

@ -725,7 +725,7 @@ mod tests {
use super::*; use super::*;
use cli::Args; use cli::Args;
use ethcore_rpc::NetworkSettings; use ethcore_rpc::NetworkSettings;
use ethcore::client::{VMType, BlockId}; use ethcore::client::{VMType, BlockId, UpdatePolicy, UpdateFilter};
use ethcore::miner::{MinerOptions, PrioritizationStrategy}; use ethcore::miner::{MinerOptions, PrioritizationStrategy};
use helpers::{replace_home, default_network_config}; use helpers::{replace_home, default_network_config};
use run::RunCmd; use run::RunCmd;
@ -938,6 +938,7 @@ mod tests {
check_seal: true, check_seal: true,
download_old_blocks: true, download_old_blocks: true,
require_consensus: true, require_consensus: true,
update_policy: Default::default(),
})); }));
} }
@ -972,11 +973,8 @@ mod tests {
// then // then
assert_eq!(conf0.update_policy().unwrap(), UpdatePolicy{enable_downloading: true, filter: UpdateFilter::Critical}); assert_eq!(conf0.update_policy().unwrap(), UpdatePolicy{enable_downloading: true, filter: UpdateFilter::Critical});
mining_options.tx_queue_strategy = PrioritizationStrategy::GasFactorAndGasPrice;
assert_eq!(conf1.update_policy().unwrap(), UpdatePolicy{enable_downloading: true, filter: UpdateFilter::All}); assert_eq!(conf1.update_policy().unwrap(), UpdatePolicy{enable_downloading: true, filter: UpdateFilter::All});
mining_options.tx_queue_strategy = PrioritizationStrategy::GasPriceOnly;
assert_eq!(conf2.update_policy().unwrap(), UpdatePolicy{enable_downloading: false, filter: UpdateFilter::Patch}); assert_eq!(conf2.update_policy().unwrap(), UpdatePolicy{enable_downloading: false, filter: UpdateFilter::Patch});
mining_options.tx_queue_strategy = PrioritizationStrategy::GasAndGasPrice;
assert!(conf3.update_policy().is_err()); assert!(conf3.update_policy().is_err());
} }