Fix tests

This commit is contained in:
Vurich
2017-06-28 16:41:08 +02:00
parent 3d8dc11442
commit 01ce28bc9a
24 changed files with 64 additions and 64 deletions

View File

@@ -36,6 +36,6 @@ pub fn sign_call<B: MiningBlockChainClient, M: MinerService>(
gas: request.gas.unwrap_or(50_000_000.into()),
gas_price: request.gas_price.unwrap_or_else(|| default_gas_price(&**client, &**miner)),
value: request.value.unwrap_or(0.into()),
data: request.data.unwrap_or(Vec::new())
data: request.data.unwrap_or_default(),
}.fake_sign(from))
}

View File

@@ -192,7 +192,7 @@ impl LightFetch {
let action = req.to.map_or(Action::Create, Action::Call);
let gas = req.gas.unwrap_or(U256::from(10_000_000)); // better gas amount?
let value = req.value.unwrap_or_else(U256::zero);
let data = req.data.unwrap_or(Vec::new());
let data = req.data.unwrap_or_default();
future::done(match nonce {
Some(n) => Ok(EthTransaction {

View File

@@ -518,7 +518,7 @@ fn should_confirm_decrypt_with_phrase() {
), Origin::Unknown).unwrap();
assert_eq!(tester.signer.requests().len(), 1);
let decrypted = serde_json::to_string(&RpcBytes::new(b"phrase".into_vec())).unwrap();
let decrypted = serde_json::to_string(&RpcBytes::new(b"phrase".to_vec())).unwrap();
// when
let request = r#"{