@@ -22,7 +22,7 @@ use apollo_consensus_orchestrator_config::config::{
2222 PricePerHeight ,
2323} ;
2424use apollo_l1_gas_price_types:: errors:: {
25- EthToStrkOracleClientError ,
25+ ExchangeRateOracleClientError ,
2626 L1GasPriceClientError ,
2727 L1GasPriceProviderError ,
2828} ;
@@ -642,7 +642,7 @@ async fn gas_price_limits(#[case] maximum: bool) {
642642 0
643643 } ;
644644 let mut l1_gas_price_provider = MockL1GasPriceProviderClient :: new ( ) ;
645- l1_gas_price_provider. expect_get_eth_to_fri_rate ( ) . returning ( |_| Ok ( ETH_TO_FRI_RATE ) ) ;
645+ l1_gas_price_provider. expect_get_rate ( ) . returning ( |_| Ok ( ETH_TO_FRI_RATE ) ) ;
646646 l1_gas_price_provider. expect_get_price_info ( ) . returning ( move |_| {
647647 Ok ( PriceInfo {
648648 base_fee_per_gas : GasPrice ( measured_price) ,
@@ -835,7 +835,7 @@ async fn oracle_fails_on_startup(#[case] l1_oracle_failure: bool) {
835835
836836 if l1_oracle_failure {
837837 let mut l1_prices_oracle_client = MockL1GasPriceProviderClient :: new ( ) ;
838- l1_prices_oracle_client. expect_get_eth_to_fri_rate ( ) . returning ( |_| Ok ( ETH_TO_FRI_RATE ) ) ;
838+ l1_prices_oracle_client. expect_get_rate ( ) . returning ( |_| Ok ( ETH_TO_FRI_RATE ) ) ;
839839 l1_prices_oracle_client. expect_get_price_info ( ) . times ( 1 ) . return_const ( Err (
840840 L1GasPriceClientError :: L1GasPriceProviderError (
841841 // random error, these parameters don't mean anything
@@ -851,9 +851,9 @@ async fn oracle_fails_on_startup(#[case] l1_oracle_failure: bool) {
851851 blob_fee : GasPrice ( TEMP_ETH_BLOB_GAS_FEE_IN_WEI ) ,
852852 } )
853853 } ) ;
854- l1_prices_oracle_client. expect_get_eth_to_fri_rate ( ) . times ( 1 ) . return_once ( |_| {
855- Err ( L1GasPriceClientError :: EthToStrkOracleClientError (
856- EthToStrkOracleClientError :: MissingFieldError ( "" . to_string ( ) , "" . to_string ( ) ) ,
854+ l1_prices_oracle_client. expect_get_rate ( ) . times ( 1 ) . return_once ( |_| {
855+ Err ( L1GasPriceClientError :: ExchangeRateOracleClientError (
856+ ExchangeRateOracleClientError :: MissingFieldError ( "" . to_string ( ) , "" . to_string ( ) ) ,
857857 ) )
858858 } ) ;
859859 deps. l1_gas_price_provider = l1_prices_oracle_client;
@@ -923,7 +923,7 @@ async fn oracle_fails_on_second_block(#[case] l1_oracle_failure: bool) {
923923 // set the oracle to succeed on first block and fail on second
924924 if l1_oracle_failure {
925925 let mut l1_prices_oracle_client = MockL1GasPriceProviderClient :: new ( ) ;
926- l1_prices_oracle_client. expect_get_eth_to_fri_rate ( ) . returning ( |_| Ok ( ETH_TO_FRI_RATE ) ) ;
926+ l1_prices_oracle_client. expect_get_rate ( ) . returning ( |_| Ok ( ETH_TO_FRI_RATE ) ) ;
927927 l1_prices_oracle_client. expect_get_price_info ( ) . times ( 1 ) . return_const ( Ok ( PriceInfo {
928928 base_fee_per_gas : GasPrice ( TEMP_ETH_GAS_FEE_IN_WEI ) ,
929929 blob_fee : GasPrice ( TEMP_ETH_BLOB_GAS_FEE_IN_WEI ) ,
@@ -945,14 +945,11 @@ async fn oracle_fails_on_second_block(#[case] l1_oracle_failure: bool) {
945945 } )
946946 } ) ;
947947 // Set the eth_to_fri_rate to succeed on first block and fail on second.
948- l1_prices_oracle_client
949- . expect_get_eth_to_fri_rate ( )
950- . times ( 1 )
951- . return_once ( |_| Ok ( ETH_TO_FRI_RATE ) ) ;
948+ l1_prices_oracle_client. expect_get_rate ( ) . times ( 1 ) . return_once ( |_| Ok ( ETH_TO_FRI_RATE ) ) ;
952949 // Set the eth_to_fri_rate to fail on second block.
953- l1_prices_oracle_client. expect_get_eth_to_fri_rate ( ) . times ( 1 ) . return_once ( |_| {
954- Err ( L1GasPriceClientError :: EthToStrkOracleClientError (
955- EthToStrkOracleClientError :: MissingFieldError ( "" . to_string ( ) , "" . to_string ( ) ) ,
950+ l1_prices_oracle_client. expect_get_rate ( ) . times ( 1 ) . return_once ( |_| {
951+ Err ( L1GasPriceClientError :: ExchangeRateOracleClientError (
952+ ExchangeRateOracleClientError :: MissingFieldError ( "" . to_string ( ) , "" . to_string ( ) ) ,
956953 ) )
957954 } ) ;
958955 deps. l1_gas_price_provider = l1_prices_oracle_client;
0 commit comments