-
Notifications
You must be signed in to change notification settings - Fork 325
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(NNS): allow execution of proposals that remove non-existing nodes (
#3339) Prevent that race conditions such as the one in the following proposal prevent proposal execution: https://dashboard.internetcomputer.org/proposal/134665 It's impossible to completely prevent race conditions such as this one so we should handle them gracefully when possible. ### Refactor Node Removal Logic - Extracted the node retrieval logic into a new function `get_node` that returns an `Option<NodeRecord>`. - Simplified the `get_node_or_panic` function to leverage `get_node` for node retrieval. ### Improvements in Node Management - Updated the `do_remove_nodes` logic to skip nodes that aren't found in the registry, thus handling potential race conditions gracefully. Also added several tests for the above
- Loading branch information
1 parent
ea8cf53
commit fc935aa
Showing
3 changed files
with
212 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters