mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-01-09 15:37:56 -05:00
update spectests to 1.4.0-beta.5 (#13318)
* update spectests to 1.4.0-beta.5 * add spec config
This commit is contained in:
@@ -151,4 +151,14 @@ func (bb *Builder) Check(t testing.TB, c *Check) {
|
||||
got := fmt.Sprintf("%#x", bb.service.ProposerBoost())
|
||||
require.DeepEqual(t, want, got)
|
||||
}
|
||||
if c.GetProposerHead != nil {
|
||||
want := fmt.Sprintf("%#x", common.FromHex(*c.GetProposerHead))
|
||||
got := fmt.Sprintf("%#x", bb.service.GetProposerHead())
|
||||
require.DeepEqual(t, want, got)
|
||||
}
|
||||
/* TODO: We need to mock the entire proposer system to be able to test this.
|
||||
if c.ShouldOverrideFCU != nil {
|
||||
require.DeepEqual(t, c.ShouldOverrideFCU.Result, bb.service.ShouldOverrideFCU())
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
@@ -14,13 +14,15 @@ type Step struct {
|
||||
}
|
||||
|
||||
type Check struct {
|
||||
Time *int `json:"time"`
|
||||
GenesisTime int `json:"genesis_time"`
|
||||
ProposerBoostRoot *string `json:"proposer_boost_root"`
|
||||
Head *SlotRoot `json:"head"`
|
||||
JustifiedCheckPoint *EpochRoot `json:"justified_checkpoint"`
|
||||
BestJustifiedCheckPoint *EpochRoot `json:"best_justified_checkpoint"`
|
||||
FinalizedCheckPoint *EpochRoot `json:"finalized_checkpoint"`
|
||||
Time *int `json:"time"`
|
||||
GenesisTime int `json:"genesis_time"`
|
||||
ProposerBoostRoot *string `json:"proposer_boost_root"`
|
||||
Head *SlotRoot `json:"head"`
|
||||
JustifiedCheckPoint *EpochRoot `json:"justified_checkpoint"`
|
||||
BestJustifiedCheckPoint *EpochRoot `json:"best_justified_checkpoint"`
|
||||
FinalizedCheckPoint *EpochRoot `json:"finalized_checkpoint"`
|
||||
GetProposerHead *string `json:"get_proposer_head"`
|
||||
ShouldOverrideFCU *ShouldOverride `json:"should_override_forkchoice_update"`
|
||||
}
|
||||
|
||||
type SlotRoot struct {
|
||||
@@ -38,3 +40,8 @@ type MockEngineResp struct {
|
||||
LatestValidHash *string `json:"latest_valid_hash"`
|
||||
ValidationError *string `json:"validation_error"`
|
||||
}
|
||||
|
||||
type ShouldOverride struct {
|
||||
ValidatorConnected bool `json:"validator_is_connected"`
|
||||
Result bool `json:"result"`
|
||||
}
|
||||
|
||||
@@ -130,7 +130,7 @@ func UnmarshalledSSZ(t *testing.T, serializedBytes []byte, folderName string) (i
|
||||
case "BlobIdentifier":
|
||||
obj = ðpb.BlobIdentifier{}
|
||||
case "BlobSidecar":
|
||||
obj = ðpb.DeprecatedBlobSidecar{}
|
||||
obj = ðpb.BlobSidecar{}
|
||||
case "SignedBlobSidecar":
|
||||
obj = ðpb.SignedBlobSidecar{}
|
||||
case "PowBlock":
|
||||
|
||||
Reference in New Issue
Block a user