diff --git a/beacon-chain/cache/committee.go b/beacon-chain/cache/committee.go index badce0560a61..671b65af7313 100644 --- a/beacon-chain/cache/committee.go +++ b/beacon-chain/cache/committee.go @@ -129,7 +129,7 @@ func (c *CommitteeCache) ActiveIndices(seed [32]byte) ([]uint64, error) { } // ActiveIndicesCount returns the active indices count of a given seed stored in cache. -func (c *CommitteeCache) ActiveIndicesCount(seed [32]byte) (int, error) { +func (c *CommitteeCache) ActiveIndicesCount(seed [32]byte) (uint64, error) { c.lock.RLock() defer c.lock.RUnlock() obj, exists, err := c.CommitteeCache.GetByKey(key(seed)) @@ -149,7 +149,7 @@ func (c *CommitteeCache) ActiveIndicesCount(seed [32]byte) (int, error) { return 0, ErrNotCommittee } - return len(item.SortedIndices), nil + return uint64(len(item.SortedIndices)), nil } // HasEntry returns true if the committee cache has a value. diff --git a/beacon-chain/core/helpers/validators.go b/beacon-chain/core/helpers/validators.go index 9d381d8aa776..69a49afa582e 100644 --- a/beacon-chain/core/helpers/validators.go +++ b/beacon-chain/core/helpers/validators.go @@ -111,7 +111,7 @@ func ActiveValidatorCount(state *stateTrie.BeaconState, epoch uint64) (uint64, e return 0, errors.Wrap(err, "could not interface with committee cache") } if activeCount != 0 && state.Slot() != 0 { - return uint64(activeCount), nil + return activeCount, nil } count := uint64(0)