-
Notifications
You must be signed in to change notification settings - Fork 331
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
Unit test stake registry #59
Conversation
Unit test bls op state ret
Add a function for operators to update their socket and unit tests
Added NATSPEC to updateSocket() and updated revert strings to match the actual name of the contract
Add updateSocket() and correct revert strings
/** | ||
* @notice Updates the socket of the msg.sender given they are a registered operator | ||
* @param socket is the new socket of the operator | ||
*/ | ||
function updateSocket(string memory socket) external { | ||
require(_operators[msg.sender].status == OperatorStatus.REGISTERED, "BLSRegistryCoordinatorWithIndicies.updateSocket: operator is not registered"); | ||
emit OperatorSocketUpdate(_operators[msg.sender].operatorId, socket); | ||
} | ||
|
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.
this should probably also be added to some interface, no?
please check for any other missing interface functions too!
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.
done!
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.
Small PR, nice improvements to tests -- looks like primarily making them a bit more flexible / less brittle (in particular, less usage of "magic numbers") and adding a function for an operator to update their socket.
I called out one specific instance in which a function should be added to an interface, which I definitely want to see before merging.
Otherwise it looks like there could still maybe be a bit more documentation, but IMO it's passable on this front.
Added tests for the stake registry