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

Add getters to validator manager #655

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

geoff-vball
Copy link
Contributor

@geoff-vball geoff-vball commented Nov 22, 2024

Why this should be merged

Closes #645

Makes storage getters internal. This isn't the best coding practice, but contract code-size limits made this the most practical option. Child contracts should probably never write to their parent's storage.

How is this documented

N/A

Comment on lines -472 to -479
/**
* @notice Returns the validator's weight. This weight is not guaranteed to be known by the P-Chain
* @return Weight of the validator. If the validation ID does not exist, the weight will be 0.
*/
function getWeight(bytes32 validationID) external view returns (uint64) {
return getValidator(validationID).weight;
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is redundant, we have an external getting for the Validator object

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Backlog 🗄️
Development

Successfully merging this pull request may close these issues.

Add more getters to the ValidatorManager contract
2 participants