mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-01-09 15:37:56 -05:00
Move State Protos Into V2 Namespace (#9257)
* move state protos * regen ssz * edit v1 code * fix imports * building * beacon chain builds * validator and shared builds * fuzz builds * changes * spectest builds * tools build * remove import cycle * generate ssz * pcli * gaz * kafka * gaz
This commit is contained in:
@@ -6,7 +6,7 @@ import (
|
||||
|
||||
types "github.com/prysmaticlabs/eth2-types"
|
||||
v1 "github.com/prysmaticlabs/prysm/beacon-chain/state/v1"
|
||||
pb "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1"
|
||||
statepb "github.com/prysmaticlabs/prysm/proto/prysm/v2/state"
|
||||
"github.com/prysmaticlabs/prysm/shared/bytesutil"
|
||||
"github.com/prysmaticlabs/prysm/shared/params"
|
||||
"github.com/prysmaticlabs/prysm/shared/testutil/assert"
|
||||
@@ -20,7 +20,7 @@ func TestRandaoMix_OK(t *testing.T) {
|
||||
binary.LittleEndian.PutUint64(intInBytes, uint64(i))
|
||||
randaoMixes[i] = intInBytes
|
||||
}
|
||||
state, err := v1.InitializeFromProto(&pb.BeaconState{RandaoMixes: randaoMixes})
|
||||
state, err := v1.InitializeFromProto(&statepb.BeaconState{RandaoMixes: randaoMixes})
|
||||
require.NoError(t, err)
|
||||
tests := []struct {
|
||||
epoch types.Epoch
|
||||
@@ -54,7 +54,7 @@ func TestRandaoMix_CopyOK(t *testing.T) {
|
||||
binary.LittleEndian.PutUint64(intInBytes, uint64(i))
|
||||
randaoMixes[i] = intInBytes
|
||||
}
|
||||
state, err := v1.InitializeFromProto(&pb.BeaconState{RandaoMixes: randaoMixes})
|
||||
state, err := v1.InitializeFromProto(&statepb.BeaconState{RandaoMixes: randaoMixes})
|
||||
require.NoError(t, err)
|
||||
tests := []struct {
|
||||
epoch types.Epoch
|
||||
@@ -95,7 +95,7 @@ func TestGenerateSeed_OK(t *testing.T) {
|
||||
randaoMixes[i] = intInBytes
|
||||
}
|
||||
slot := params.BeaconConfig().SlotsPerEpoch.Mul(uint64(params.BeaconConfig().MinSeedLookahead * 10))
|
||||
state, err := v1.InitializeFromProto(&pb.BeaconState{
|
||||
state, err := v1.InitializeFromProto(&statepb.BeaconState{
|
||||
RandaoMixes: randaoMixes,
|
||||
Slot: slot,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user