parent
0199acbece
commit
04c6867660
@ -15,17 +15,15 @@
|
|||||||
// along with Parity Ethereum. If not, see <http://www.gnu.org/licenses/>.
|
// along with Parity Ethereum. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
use types::transaction::{Transaction, SignedTransaction, Action};
|
use types::transaction::{Transaction, SignedTransaction, Action};
|
||||||
|
use std::cmp::min;
|
||||||
|
|
||||||
use ethereum_types::U256;
|
use ethereum_types::U256;
|
||||||
use jsonrpc_core::Error;
|
use jsonrpc_core::Error;
|
||||||
use v1::helpers::CallRequest;
|
use v1::helpers::CallRequest;
|
||||||
|
|
||||||
pub fn sign_call(request: CallRequest) -> Result<SignedTransaction, Error> {
|
pub fn sign_call(request: CallRequest) -> Result<SignedTransaction, Error> {
|
||||||
let max_gas = U256::from(50_000_000);
|
let max_gas = U256::from(500_000_000);
|
||||||
let gas = match request.gas {
|
let gas = min(request.gas.unwrap_or(max_gas), max_gas);
|
||||||
Some(gas) => gas,
|
|
||||||
None => max_gas * 10_u32,
|
|
||||||
};
|
|
||||||
let from = request.from.unwrap_or_default();
|
let from = request.from.unwrap_or_default();
|
||||||
|
|
||||||
Ok(Transaction {
|
Ok(Transaction {
|
||||||
|
Loading…
Reference in New Issue
Block a user