Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove backwards compatibility for state comparison #299

Merged
merged 1 commit into from
Aug 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions qbft/spectest/tests/controller_spectest.go
Original file line number Diff line number Diff line change
Expand Up @@ -208,11 +208,6 @@ func (test *ControllerSpecTest) overrideStateComparison(t *testing.T) {
r, err := sc[i].GetRoot()
require.NoError(t, err)

// backwards compatability test, hard coded post root must be equal to the one loaded from file
if len(runData.ControllerPostRoot) > 0 {
require.EqualValues(t, runData.ControllerPostRoot, hex.EncodeToString(r[:]))
}

runData.ControllerPostRoot = hex.EncodeToString(r[:])
}
}
Expand Down
5 changes: 0 additions & 5 deletions ssv/spectest/tests/msg_processing_spectest.go
Original file line number Diff line number Diff line change
Expand Up @@ -187,11 +187,6 @@ func overrideStateComparison(t *testing.T, test *MsgProcessingSpecTest, name str
root, err := runner.GetRoot()
require.NoError(t, err)

// backwards compatability test, hard coded post root must be equal to the one loaded from file
if len(test.PostDutyRunnerStateRoot) > 0 {
require.EqualValues(t, test.PostDutyRunnerStateRoot, hex.EncodeToString(root[:]), "post runner state not equal")
}

test.PostDutyRunnerStateRoot = hex.EncodeToString(root[:])
}

Expand Down
5 changes: 0 additions & 5 deletions ssv/spectest/tests/runner/duties/newduty/test.go
Original file line number Diff line number Diff line change
Expand Up @@ -187,10 +187,5 @@ func overrideStateComparison(t *testing.T, test *StartNewRunnerDutySpecTest, nam
root, err := runner.GetRoot()
require.NoError(t, err)

// backwards compatability test, hard coded post root must be equal to the one loaded from file
if len(test.PostDutyRunnerStateRoot) > 0 {
require.EqualValues(t, test.PostDutyRunnerStateRoot, hex.EncodeToString(root[:]), "post runner state not equal")
}

test.PostDutyRunnerStateRoot = hex.EncodeToString(root[:])
}
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,5 @@ func (test *SyncCommitteeAggregatorProofSpecTest) overrideStateComparison(t *tes
r, err2 := postState.GetRoot()
require.NoError(t, err2)

// backwards compatability test, hard coded post root must be equal to the one loaded from file
if len(test.PostDutyRunnerStateRoot) > 0 {
require.EqualValues(t, test.PostDutyRunnerStateRoot, hex.EncodeToString(r[:]))
}

test.PostDutyRunnerStateRoot = hex.EncodeToString(r[:])
}