Service as proper names (#4293)

This commit is contained in:
terence tsao
2019-12-16 17:53:55 -08:00
committed by Raul Jordan
parent 514f5f904f
commit 23a6c20dd4
37 changed files with 102 additions and 102 deletions

View File

@@ -21,7 +21,7 @@ import (
var processPendingBlocksPeriod = time.Duration(params.BeaconConfig().SecondsPerSlot/3) * time.Second
// processes pending blocks queue on every processPendingBlocksPeriod
func (r *RegularSync) processPendingBlocksQueue() {
func (r *Service) processPendingBlocksQueue() {
ctx := context.Background()
runutil.RunEvery(r.ctx, processPendingBlocksPeriod, func() {
r.processPendingBlocks(ctx)
@@ -29,7 +29,7 @@ func (r *RegularSync) processPendingBlocksQueue() {
}
// processes the block tree inside the queue
func (r *RegularSync) processPendingBlocks(ctx context.Context) error {
func (r *Service) processPendingBlocks(ctx context.Context) error {
ctx, span := trace.StartSpan(ctx, "processPendingBlocks")
defer span.End()
@@ -98,7 +98,7 @@ func (r *RegularSync) processPendingBlocks(ctx context.Context) error {
return nil
}
func (r *RegularSync) sortedPendingSlots() []int {
func (r *Service) sortedPendingSlots() []int {
r.pendingQueueLock.RLock()
defer r.pendingQueueLock.RUnlock()
@@ -113,7 +113,7 @@ func (r *RegularSync) sortedPendingSlots() []int {
// validatePendingSlots validates the pending blocks
// by their slot. If they are before the current finalized
// checkpoint, these blocks are removed from the queue.
func (r *RegularSync) validatePendingSlots() error {
func (r *Service) validatePendingSlots() error {
r.pendingQueueLock.RLock()
defer r.pendingQueueLock.RUnlock()
oldBlockRoots := make(map[[32]byte]bool)