mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-01-09 15:37:56 -05:00
Service as proper names (#4293)
This commit is contained in:
committed by
Raul Jordan
parent
514f5f904f
commit
23a6c20dd4
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user