-
Notifications
You must be signed in to change notification settings - Fork 21
Removed redundant checks from _send_approval_request #626
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR removes redundant error handling checks from the _send_approval_request function that were verifying if the registry root or validator index had changed during network failures. The code is simplified by removing the try-except block and associated custom exception classes.
Key Changes:
- Removed custom exception classes
RegistryRootChangedErrorandValidatorIndexChangedErrorfrom the exceptions module - Simplified
_send_approval_requestfunction by removing error handling that checked for registry state changes - Removed unused imports related to the deleted validation logic
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/validators/oracles.py | Removed try-except block and registry/validator index validation from _send_approval_request, cleaned up unused imports |
| src/validators/exceptions.py | Deleted custom exception classes and error message constants that are no longer needed |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| settings_key = 'VALIDATORS_REGISTRY_CONTRACT_ADDRESS' | ||
|
|
||
| async def get_registry_root(self) -> Bytes32: | ||
| async def get_registry_root(self) -> HexStr: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
HexStr is more friendly, easier for logging.
No description provided.