pub fn update_gas_price_limit(&self, gas_price_limit: U256) -> QueryResult<()> {
        self.0.conn().transaction(|| {
            let gas_price_limit: i64 =
                i64::try_from(gas_price_limit).expect("Can't convert U256 to i64");

            // Update the stored gas price limit.
            update(eth_parameters::table.filter(eth_parameters::id.eq(true)))
                .set(eth_parameters::gas_price_limit.eq(gas_price_limit))
                .execute(self.0.conn())?;

            Ok(())
        })
    }
/// Updates the stored gas price limit used by GasAdjuster.
///
/// This method expects the database to be initially prepared with inserting the actual
/// gas limit value. Currently the script `db-insert-eth-data.sh` is responsible for that
/// and it's invoked within `db-reset` subcommand.
Updates the stored gas price limit used by GasAdjuster.
This method expects the database to be initially prepared with inserting the actual
gas limit value. Currently the script `db-insert-eth-data.sh` is responsible for that
and it's invoked within `db-reset` subcommand.
Updates the stored gas price limit used by GasAdjuster . This method expects the database to be initially prepared with inserting the actual gas limit value . Currently the script ` db - insert - eth - data . sh ` is responsible for that and it ' s invoked within ` db - reset ` subcommand .
pub fn update_gas_price_limit(&self, gas_price_limit: U256) -> QueryResult<()> {
        self.0.conn().transaction(|| {
            let gas_price_limit: i64 =
                i64::try_from(gas_price_limit).expect("Can't convert U256 to i64");
            // Update the stored gas price limit.
            update(eth_parameters::table.filter(eth_parameters::id.eq(true)))
                .set(eth_parameters::gas_price_limit.eq(gas_price_limit))
                .execute(self.0.conn())?;
            Ok(())
        })
    }
pub fn update_gas_price_limit ( & self , gas_price_limit : U256 ) -> QueryResult < ( ) > { self . 0 . conn ( ) . transaction ( | | { let gas_price_limit : i64 = i64 :: try_from ( gas_price_limit ) . expect ( " " ) ; // Update the stored gas price limit. update ( eth_parameters :: table . filter ( eth_parameters :: id . eq ( true ) ) ) . set ( eth_parameters :: gas_price_limit . eq ( gas_price_limit ) ) . execute ( self . 0 . conn ( ) ) ? ; Ok ( ( ) ) } ) }
Updates the stored gas price limit used by GasAdjuster.
Updates the stored gas price limit used by GasAdjuster .
&self
gas_price_limit
U256