mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-22 03:30:35 +00:00
Use math.MaxUint64
(#9857)
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
This commit is contained in:
parent
7974fe01cd
commit
341a2f1ea3
@ -3,6 +3,7 @@ package debug
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"math"
|
||||
|
||||
types "github.com/prysmaticlabs/eth2-types"
|
||||
"github.com/prysmaticlabs/prysm/beacon-chain/core/helpers"
|
||||
@ -61,7 +62,7 @@ func (ds *Server) GetInclusionSlot(ctx context.Context, req *pbrpc.InclusionSlot
|
||||
return nil, status.Errorf(codes.Internal, "Could not retrieve blocks: %v", err)
|
||||
}
|
||||
|
||||
inclusionSlot := types.Slot(1<<64 - 1)
|
||||
inclusionSlot := types.Slot(math.MaxUint64)
|
||||
targetStates := make(map[[32]byte]state.ReadOnlyBeaconState)
|
||||
for _, blk := range blks {
|
||||
for _, a := range blk.Block().Body().Attestations() {
|
||||
|
@ -65,8 +65,8 @@ var mainnetNetworkConfig = &NetworkConfig{
|
||||
|
||||
var mainnetBeaconConfig = &BeaconChainConfig{
|
||||
// Constants (Non-configurable)
|
||||
FarFutureEpoch: 1<<64 - 1,
|
||||
FarFutureSlot: 1<<64 - 1,
|
||||
FarFutureEpoch: math.MaxUint64,
|
||||
FarFutureSlot: math.MaxUint64,
|
||||
BaseRewardsPerEpoch: 4,
|
||||
DepositContractTreeDepth: 32,
|
||||
GenesisDelay: 604800, // 1 week.
|
||||
|
@ -82,8 +82,8 @@ func MinimalSpecConfig() *BeaconChainConfig {
|
||||
minimalConfig.GenesisForkVersion = []byte{0, 0, 0, 1}
|
||||
|
||||
minimalConfig.DepositContractTreeDepth = 32
|
||||
minimalConfig.FarFutureEpoch = 1<<64 - 1
|
||||
minimalConfig.FarFutureSlot = 1<<64 - 1
|
||||
minimalConfig.FarFutureEpoch = math.MaxUint64
|
||||
minimalConfig.FarFutureSlot = math.MaxUint64
|
||||
|
||||
// New Altair params
|
||||
minimalConfig.AltairForkVersion = []byte{1, 0, 0, 1} // Highest byte set to 0x01 to avoid collisions with mainnet versioning
|
||||
|
@ -416,8 +416,8 @@ func TestPrevSlot(t *testing.T) {
|
||||
},
|
||||
{
|
||||
name: "max",
|
||||
slot: 1<<64 - 1,
|
||||
want: 1<<64 - 1 - 1,
|
||||
slot: math.MaxUint64,
|
||||
want: math.MaxUint64 - 1,
|
||||
},
|
||||
}
|
||||
for _, tt := range tests {
|
||||
|
Loading…
Reference in New Issue
Block a user