File tree Expand file tree Collapse file tree 3 files changed +9
-18
lines changed Expand file tree Collapse file tree 3 files changed +9
-18
lines changed Original file line number Diff line number Diff line change @@ -83,23 +83,16 @@ async def update_oracles_cache() -> None:
83
83
rewards_threshold = Web3 .to_int (multicall_response [0 ][1 ])
84
84
validators_threshold = Web3 .to_int (multicall_response [1 ][1 ])
85
85
86
- if _oracles_cache :
87
- _oracles_cache .config = config
88
- _oracles_cache .validators_threshold = validators_threshold
89
- _oracles_cache .rewards_threshold = rewards_threshold
90
- _oracles_cache .checkpoint_block = to_block
91
- else :
92
- _oracles_cache = OraclesCache (
93
- config = config ,
94
- validators_threshold = validators_threshold ,
95
- rewards_threshold = rewards_threshold ,
96
- checkpoint_block = to_block ,
97
- )
86
+ _oracles_cache = OraclesCache (
87
+ config = config ,
88
+ validators_threshold = validators_threshold ,
89
+ rewards_threshold = rewards_threshold ,
90
+ checkpoint_block = to_block ,
91
+ )
98
92
99
93
100
94
async def get_oracles () -> Oracles :
101
- if not _oracles_cache :
102
- await update_oracles_cache ()
95
+ await update_oracles_cache ()
103
96
104
97
oracles_cache = cast (OraclesCache , _oracles_cache )
105
98
Original file line number Diff line number Diff line change 8
8
9
9
from src .common .contracts import keeper_contract
10
10
from src .common .exceptions import NotEnoughOracleApprovalsError
11
- from src .common .execution import get_oracles , update_oracles_cache
11
+ from src .common .execution import get_oracles
12
12
from src .common .metrics import metrics
13
13
from src .common .typings import Oracles
14
14
from src .common .utils import get_current_timestamp , is_block_finalized
@@ -34,7 +34,6 @@ async def update_exit_signatures(
34
34
keystores : Keystores ,
35
35
remote_signer_config : RemoteSignerConfiguration | None ,
36
36
) -> None :
37
- await update_oracles_cache ()
38
37
oracles = await get_oracles ()
39
38
update_block = await _fetch_last_update_block ()
40
39
if update_block and not await is_block_finalized (update_block ):
Original file line number Diff line number Diff line change 9
9
from src .common .clients import ipfs_fetch_client
10
10
from src .common .contracts import v2_pool_escrow_contract , validators_registry_contract
11
11
from src .common .exceptions import NotEnoughOracleApprovalsError
12
- from src .common .execution import check_gas_price , get_oracles , update_oracles_cache
12
+ from src .common .execution import check_gas_price , get_oracles
13
13
from src .common .metrics import metrics
14
14
from src .common .typings import Oracles
15
15
from src .common .utils import MGNO_RATE , WAD , get_current_timestamp
@@ -72,7 +72,6 @@ async def register_validators(
72
72
return
73
73
74
74
# get latest oracles
75
- await update_oracles_cache ()
76
75
oracles = await get_oracles ()
77
76
78
77
validators_count = min (oracles .validators_approval_batch_limit , validators_count )
You can’t perform that action at this time.
0 commit comments