This function should be expanded into several different ones with slightly different usages. Currently, it checks for the existence of a piece of metadata that is written if become_validator has been called for an address. However, sometimes we would like to know if an address is a validator at a certain epoch in the future, which could yield different results than the current check. We may also want to check if a validator is one in a range of epochs.
We already have the validator_addresses in storage for epochs, so we should use this.
This function should be expanded into several different ones with slightly different usages. Currently, it checks for the existence of a piece of metadata that is written if
become_validator
has been called for an address. However, sometimes we would like to know if an address is a validator at a certain epoch in the future, which could yield different results than the current check. We may also want to check if a validator is one in a range of epochs.We already have the
validator_addresses
in storage for epochs, so we should use this.