diff --git a/core/backend.go b/core/backend.go index 1fa348b..8be7b82 100644 --- a/core/backend.go +++ b/core/backend.go @@ -69,7 +69,7 @@ type Notifier interface { type Backend interface { MessageConstructor Verifier - validatorBackend + ValidatorBackend Notifier // BuildProposal builds a new proposal for the given view (height and round) diff --git a/core/validator_manager.go b/core/validator_manager.go index 894ab48..139f9fb 100644 --- a/core/validator_manager.go +++ b/core/validator_manager.go @@ -13,8 +13,8 @@ var ( errVotingPowerNotCorrect = errors.New("total voting power is zero or less") ) -// validatorBackend defines interface that has GetVotingPower -type validatorBackend interface { +// ValidatorBackend defines interface that has GetVotingPower +type ValidatorBackend interface { // GetVotingPowers returns map of validators addresses and their voting powers for the specified height. GetVotingPowers(height uint64) (map[string]*big.Int, error) } @@ -30,13 +30,13 @@ type ValidatorManager struct { // the height specified in the current View validatorsVotingPower map[string]*big.Int - backend validatorBackend + backend ValidatorBackend log Logger } // NewValidatorManager creates new ValidatorManager -func NewValidatorManager(backend validatorBackend, log Logger) *ValidatorManager { +func NewValidatorManager(backend ValidatorBackend, log Logger) *ValidatorManager { return &ValidatorManager{ quorumSize: big.NewInt(0), backend: backend,