Adding default for value (#1465)

This commit is contained in:
Tomasz Drwięga
2016-06-28 11:10:39 +02:00
committed by Gav Wood
parent a3a68a20f4
commit 6895a56099
2 changed files with 4 additions and 1 deletions

View File

@@ -29,6 +29,9 @@ use v1::impls::{default_gas_price, sign_and_dispatch};
fn fill_optional_fields<C, M>(request: &mut TransactionRequest, client: &C, miner: &M)
where C: MiningBlockChainClient, M: MinerService {
if request.value.is_none() {
request.value = Some(U256::zero());
}
if request.gas.is_none() {
request.gas = Some(miner.sensible_gas_limit());
}