Skip to content
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

Merged
merged 14 commits into from
Aug 2, 2023
Merged

Unit test stake registry #59

merged 14 commits into from
Aug 2, 2023

Conversation

gpsanant
Copy link
Contributor

@gpsanant gpsanant commented Jun 6, 2023

Added tests for the stake registry

Base automatically changed from impl-registry-coordinator to multiquorums June 27, 2023 18:14
@gpsanant gpsanant marked this pull request as ready for review August 2, 2023 16:22
Comment on lines +279 to +287
/**
* @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);
}

Copy link
Contributor

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!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done!

Copy link
Contributor

@ChaoticWalrus ChaoticWalrus left a 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.

@gpsanant gpsanant merged commit d294e01 into multiquorums Aug 2, 2023
8 checks passed
@gpsanant gpsanant deleted the unit-test-stake-registry branch August 2, 2023 19:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants