Documentation ¶
Index ¶
- Constants
- Variables
- func FetchBLSValidators(transition *state.Transition, from types.Address) (validators.Validators, error)
- func FetchECDSAValidators(transition *state.Transition, from types.Address) (validators.Validators, error)
- func FetchValidators(validatorType validators.ValidatorType, transition *state.Transition, ...) (validators.Validators, error)
- type ContractValidatorStore
- type Executor
Constants ¶
View Source
const ( // How many validator sets are stored in the cache // Cache 3 validator sets for 3 epochs DefaultValidatorSetCacheSize = 3 )
Variables ¶
View Source
var ( ErrSignerNotFound = errors.New("signer not found") ErrInvalidValidatorsTypeAssertion = errors.New("invalid type assertion for Validators") )
Functions ¶
func FetchBLSValidators ¶
func FetchBLSValidators( transition *state.Transition, from types.Address, ) (validators.Validators, error)
FetchBLSValidators queries a contract for validator addresses & BLS Public Keys and returns ECDSAValidators
func FetchECDSAValidators ¶
func FetchECDSAValidators( transition *state.Transition, from types.Address, ) (validators.Validators, error)
FetchECDSAValidators queries a contract for validator addresses and returns ECDSAValidators
func FetchValidators ¶
func FetchValidators( validatorType validators.ValidatorType, transition *state.Transition, from types.Address, ) (validators.Validators, error)
FetchValidators fetches validators from a contract switched by validator type
Types ¶
type ContractValidatorStore ¶
type ContractValidatorStore struct {
// contains filtered or unexported fields
}
func NewContractValidatorStore ¶
func NewContractValidatorStore( logger hclog.Logger, blockchain store.HeaderGetter, executor Executor, validatorSetCacheSize int, ) (*ContractValidatorStore, error)
func (*ContractValidatorStore) GetValidatorsByHeight ¶
func (s *ContractValidatorStore) GetValidatorsByHeight( validatorType validators.ValidatorType, height uint64, ) (validators.Validators, error)
func (*ContractValidatorStore) SourceType ¶
func (s *ContractValidatorStore) SourceType() store.SourceType
Click to show internal directories.
Click to hide internal directories.