Skip to content

Commit

Permalink
Revert making ValidatorBackend internal interface
Browse files Browse the repository at this point in the history
  • Loading branch information
Stefan-Ethernal committed Apr 26, 2024
1 parent 563d909 commit 6063d03
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion core/backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
8 changes: 4 additions & 4 deletions core/validator_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand All @@ -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,
Expand Down

0 comments on commit 6063d03

Please sign in to comment.