Adding default for value (#1465)
This commit is contained in:
parent
a3a68a20f4
commit
6895a56099
2
Cargo.lock
generated
2
Cargo.lock
generated
@ -1446,7 +1446,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
[[package]]
|
||||
name = "ws"
|
||||
version = "0.5.0"
|
||||
source = "git+https://github.com/ethcore/ws-rs.git?branch=stable#e2452450c830618aed30db02e63f3a68710cc40e"
|
||||
source = "git+https://github.com/ethcore/ws-rs.git?branch=stable#a876fc115c3ef50a17c8822c9bd2f6e94473e005"
|
||||
dependencies = [
|
||||
"httparse 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -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());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user