mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-25 21:07:18 +00:00
Fixed spelling of genesis (#3120)
This commit is contained in:
parent
f019e54ebb
commit
7eca7ba43b
@ -166,16 +166,16 @@ func (c *ChainService) initializeBeaconChain(genesisTime time.Time, deposits []*
|
|||||||
return nil, fmt.Errorf("could not set chain head, %v", err)
|
return nil, fmt.Errorf("could not set chain head, %v", err)
|
||||||
}
|
}
|
||||||
if err := c.beaconDB.SaveJustifiedBlock(genBlock); err != nil {
|
if err := c.beaconDB.SaveJustifiedBlock(genBlock); err != nil {
|
||||||
return nil, fmt.Errorf("could not save gensis block as justified block: %v", err)
|
return nil, fmt.Errorf("could not save genesis block as justified block: %v", err)
|
||||||
}
|
}
|
||||||
if err := c.beaconDB.SaveFinalizedBlock(genBlock); err != nil {
|
if err := c.beaconDB.SaveFinalizedBlock(genBlock); err != nil {
|
||||||
return nil, fmt.Errorf("could not save gensis block as finalized block: %v", err)
|
return nil, fmt.Errorf("could not save genesis block as finalized block: %v", err)
|
||||||
}
|
}
|
||||||
if err := c.beaconDB.SaveJustifiedState(beaconState); err != nil {
|
if err := c.beaconDB.SaveJustifiedState(beaconState); err != nil {
|
||||||
return nil, fmt.Errorf("could not save gensis state as justified state: %v", err)
|
return nil, fmt.Errorf("could not save genesis state as justified state: %v", err)
|
||||||
}
|
}
|
||||||
if err := c.beaconDB.SaveFinalizedState(beaconState); err != nil {
|
if err := c.beaconDB.SaveFinalizedState(beaconState); err != nil {
|
||||||
return nil, fmt.Errorf("could not save gensis state as finalized state: %v", err)
|
return nil, fmt.Errorf("could not save genesis state as finalized state: %v", err)
|
||||||
}
|
}
|
||||||
return beaconState, nil
|
return beaconState, nil
|
||||||
}
|
}
|
||||||
|
@ -300,7 +300,7 @@ func TestWinningCrosslink_CantGetMatchingAtts(t *testing.T) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestWinningCrosslink_ReturnGensisCrosslink(t *testing.T) {
|
func TestWinningCrosslink_ReturnGenesisCrosslink(t *testing.T) {
|
||||||
e := params.BeaconConfig().SlotsPerEpoch
|
e := params.BeaconConfig().SlotsPerEpoch
|
||||||
gs := uint64(0) // genesis slot
|
gs := uint64(0) // genesis slot
|
||||||
ge := uint64(0) // genesis epoch
|
ge := uint64(0) // genesis epoch
|
||||||
@ -323,7 +323,7 @@ func TestWinningCrosslink_ReturnGensisCrosslink(t *testing.T) {
|
|||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
if len(indices) != 0 {
|
if len(indices) != 0 {
|
||||||
t.Errorf("gensis crosslink indices is not 0, got: %d", len(indices))
|
t.Errorf("genesis crosslink indices is not 0, got: %d", len(indices))
|
||||||
}
|
}
|
||||||
if !reflect.DeepEqual(crosslink, gCrosslink) {
|
if !reflect.DeepEqual(crosslink, gCrosslink) {
|
||||||
t.Errorf("Did not get genesis crosslink, got: %v", crosslink)
|
t.Errorf("Did not get genesis crosslink, got: %v", crosslink)
|
||||||
@ -396,7 +396,7 @@ func TestWinningCrosslink_CanGetWinningRoot(t *testing.T) {
|
|||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
if len(indices) != 0 {
|
if len(indices) != 0 {
|
||||||
t.Errorf("gensis crosslink indices is not 0, got: %d", len(indices))
|
t.Errorf("genesis crosslink indices is not 0, got: %d", len(indices))
|
||||||
}
|
}
|
||||||
want := ðpb.Crosslink{StartEpoch: ge, Shard: 1, DataRoot: []byte{'B'}}
|
want := ðpb.Crosslink{StartEpoch: ge, Shard: 1, DataRoot: []byte{'B'}}
|
||||||
if !reflect.DeepEqual(winner, want) {
|
if !reflect.DeepEqual(winner, want) {
|
||||||
|
@ -5,7 +5,7 @@ package spectest
|
|||||||
|
|
||||||
import pb "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1"
|
import pb "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1"
|
||||||
|
|
||||||
type GensisValidityTest struct {
|
type GenesisValidityTest struct {
|
||||||
Title string `json:"title"`
|
Title string `json:"title"`
|
||||||
Summary string `json:"summary"`
|
Summary string `json:"summary"`
|
||||||
ForksTimeline string `json:"forks_timeline"`
|
ForksTimeline string `json:"forks_timeline"`
|
||||||
|
@ -21,7 +21,7 @@ func TestGenesisValidityMinimal(t *testing.T) {
|
|||||||
t.Fatalf("Could not load file %v", err)
|
t.Fatalf("Could not load file %v", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
s := &GensisValidityTest{}
|
s := &GenesisValidityTest{}
|
||||||
if err := testutil.UnmarshalYaml(file, s); err != nil {
|
if err := testutil.UnmarshalYaml(file, s); err != nil {
|
||||||
t.Fatalf("Failed to Unmarshal: %v", err)
|
t.Fatalf("Failed to Unmarshal: %v", err)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user