@@ -204,22 +204,19 @@ contract EigenStrategyManager is
204
204
}
205
205
}
206
206
207
- function syncBalances () external {
208
- ITokenStakingNode[] memory nodes = tokenStakingNodesManager.getAllNodes ();
209
- uint256 nodesCount = nodes.length ;
210
-
211
- for (uint256 i; i < nodesCount; i++ ) {
212
- ITokenStakingNode node = nodes[i];
213
- node.synchronize ();
207
+ function synchronizeNodesAndUpdateBalances (ITokenStakingNode[] calldata nodes ) external {
208
+ uint256 nodesLength = nodes.length ;
209
+ for (uint256 i = 0 ; i < nodesLength; i++ ) {
210
+ nodes[i].synchronize ();
214
211
}
215
-
212
+
216
213
IERC20 [] memory assets = IynEigenVars (address (ynEigen)).assetRegistry ().getAssets ();
217
214
uint256 assetsLength = assets.length ;
218
215
for (uint256 i = 0 ; i < assetsLength; i++ ) {
219
216
_updateTokenStakingNodesBalances (assets[i], IStrategy (address (0 )));
220
217
}
221
218
}
222
-
219
+
223
220
//--------------------------------------------------------------------------------------
224
221
//------------------------------------ ACCOUNTING ----------------------------------------
225
222
//--------------------------------------------------------------------------------------
@@ -230,7 +227,7 @@ contract EigenStrategyManager is
230
227
/// @param asset The ERC20 token for which the balances are to be updated.
231
228
function updateTokenStakingNodesBalances (IERC20 asset ) public {
232
229
_updateTokenStakingNodesBalances (asset, strategies[asset]);
233
- }
230
+ }
234
231
235
232
/// @notice Updates the staked balances for all nodes for a strategies.
236
233
/// @dev Should be called atomically after any node-balance-changing operation.
0 commit comments