Block interface clean up (#8947)

This commit is contained in:
terence tsao
2021-05-26 11:33:46 -07:00
committed by GitHub
parent caf9bdbc6f
commit 276d03553c
122 changed files with 767 additions and 758 deletions

View File

@@ -103,7 +103,7 @@ func generateMarshalledFullStateAndBlock() error {
if err != nil {
return err
}
beaconState, err = state.ExecuteStateTransition(context.Background(), beaconState, interfaces.NewWrappedSignedBeaconBlock(block))
beaconState, err = state.ExecuteStateTransition(context.Background(), beaconState, interfaces.WrappedPhase0SignedBeaconBlock(block))
if err != nil {
return err
}
@@ -127,7 +127,7 @@ func generateMarshalledFullStateAndBlock() error {
}
block.Block.Body.Attestations = append(atts, block.Block.Body.Attestations...)
s, err := state.CalculateStateRoot(context.Background(), beaconState, interfaces.NewWrappedSignedBeaconBlock(block))
s, err := state.CalculateStateRoot(context.Background(), beaconState, interfaces.WrappedPhase0SignedBeaconBlock(block))
if err != nil {
return errors.Wrap(err, "could not calculate state root")
}
@@ -158,7 +158,7 @@ func generateMarshalledFullStateAndBlock() error {
}
// Running a single state transition to make sure the generated files aren't broken.
_, err = state.ExecuteStateTransition(context.Background(), beaconState, interfaces.NewWrappedSignedBeaconBlock(block))
_, err = state.ExecuteStateTransition(context.Background(), beaconState, interfaces.WrappedPhase0SignedBeaconBlock(block))
if err != nil {
return err
}
@@ -192,7 +192,7 @@ func generate2FullEpochState() error {
if err != nil {
return err
}
beaconState, err = state.ExecuteStateTransition(context.Background(), beaconState, interfaces.NewWrappedSignedBeaconBlock(block))
beaconState, err = state.ExecuteStateTransition(context.Background(), beaconState, interfaces.WrappedPhase0SignedBeaconBlock(block))
if err != nil {
return err
}

View File

@@ -176,7 +176,7 @@ func main() {
blkRoot,
preStateRoot,
)
postState, err := state.ExecuteStateTransition(context.Background(), stateObj, interfaces.NewWrappedSignedBeaconBlock(block))
postState, err := state.ExecuteStateTransition(context.Background(), stateObj, interfaces.WrappedPhase0SignedBeaconBlock(block))
if err != nil {
log.Fatal(err)
}