mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-01-09 21:38:05 -05:00
Create time Package for Shared/timeutil, mclock and slotutil (#9594)
* add time pkg * Go fmt
This commit is contained in:
@@ -32,7 +32,7 @@ import (
|
||||
"github.com/prysmaticlabs/prysm/shared/testutil"
|
||||
"github.com/prysmaticlabs/prysm/shared/testutil/assert"
|
||||
"github.com/prysmaticlabs/prysm/shared/testutil/require"
|
||||
"github.com/prysmaticlabs/prysm/shared/timeutils"
|
||||
prysmTime "github.com/prysmaticlabs/prysm/time"
|
||||
"github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
@@ -103,7 +103,7 @@ func initializeTestServices(t *testing.T, slots []types.Slot, peers []*peerData)
|
||||
|
||||
// makeGenesisTime where now is the current slot.
|
||||
func makeGenesisTime(currentSlot types.Slot) time.Time {
|
||||
return timeutils.Now().Add(-1 * time.Second * time.Duration(currentSlot) * time.Duration(params.BeaconConfig().SecondsPerSlot))
|
||||
return prysmTime.Now().Add(-1 * time.Second * time.Duration(currentSlot) * time.Duration(params.BeaconConfig().SecondsPerSlot))
|
||||
}
|
||||
|
||||
// sanity test on helper function
|
||||
|
||||
Reference in New Issue
Block a user