Skip to content

Commit

Permalink
Fix nodes management
Browse files Browse the repository at this point in the history
  • Loading branch information
SigismundSchlomo committed Sep 12, 2024
1 parent 935b3ae commit 19ac273
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions contracts/staking/liquid/LiquidNodesManager.sol
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ contract LiquidNodesManager is UUPSUpgradeable, AccessControlUpgradeable {
// POOL METHODS

function stake() external payable onlyRole(POOL_ROLE) {
// retire node if maxNodesCount was changed
if (nodes.length > maxNodesCount) {
_retireNode();
}
// try to onboard new node
_requestNodeCreation();
}
Expand All @@ -64,6 +68,8 @@ contract LiquidNodesManager is UUPSUpgradeable, AccessControlUpgradeable {
_retireNode();
}
transferViaCall(payable(msg.sender), amount);
// Try to onboard new node in case if maxNodesCount was changed
_requestNodeCreation();
}
// IStakeManager impl

Expand Down

0 comments on commit 19ac273

Please sign in to comment.