mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-01-09 15:37:56 -05:00
Properly Divide SecondsPerSlot Into Milliseconds (#5821)
* use util for dividing slot durations * fix places with dividing slot duration * more dividers fixed * format import * fix formatting in validator test * fix slot test tolerance * nishant suggestions * imports * resolve e2e Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
This commit is contained in:
@@ -5,22 +5,21 @@ import (
|
||||
"encoding/hex"
|
||||
"sort"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1"
|
||||
"github.com/prysmaticlabs/prysm/beacon-chain/core/helpers"
|
||||
"github.com/prysmaticlabs/prysm/beacon-chain/state/stateutil"
|
||||
"github.com/prysmaticlabs/prysm/shared/bytesutil"
|
||||
"github.com/prysmaticlabs/prysm/shared/params"
|
||||
"github.com/prysmaticlabs/prysm/shared/runutil"
|
||||
"github.com/prysmaticlabs/prysm/shared/slotutil"
|
||||
"github.com/prysmaticlabs/prysm/shared/traceutil"
|
||||
"github.com/sirupsen/logrus"
|
||||
"go.opencensus.io/trace"
|
||||
"golang.org/x/exp/rand"
|
||||
)
|
||||
|
||||
var processPendingBlocksPeriod = time.Duration(params.BeaconConfig().SecondsPerSlot/3) * time.Second
|
||||
var processPendingBlocksPeriod = slotutil.DivideSlotBy(3 /* times per slot */)
|
||||
|
||||
// processes pending blocks queue on every processPendingBlocksPeriod
|
||||
func (r *Service) processPendingBlocksQueue() {
|
||||
|
||||
Reference in New Issue
Block a user