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

tests: fix state proof e2e test failures #5839

Merged
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
4 changes: 3 additions & 1 deletion config/consensus.go
Original file line number Diff line number Diff line change
Expand Up @@ -770,12 +770,14 @@
}

// SetConfigurableConsensusProtocols sets the configurable protocols.
func SetConfigurableConsensusProtocols(newConsensus ConsensusProtocols) {
func SetConfigurableConsensusProtocols(newConsensus ConsensusProtocols) ConsensusProtocols {
oldConsensus := Consensus

Check warning on line 774 in config/consensus.go

View check run for this annotation

Codecov / codecov/patch

config/consensus.go#L773-L774

Added lines #L773 - L774 were not covered by tests
Consensus = newConsensus
// Set allocation limits
for _, p := range Consensus {
checkSetAllocBounds(p)
}
return oldConsensus

Check warning on line 780 in config/consensus.go

View check run for this annotation

Codecov / codecov/patch

config/consensus.go#L780

Added line #L780 was not covered by tests
}

// PreloadConfigurableConsensusProtocols loads the configurable protocols from the data directory
Expand Down
3 changes: 2 additions & 1 deletion test/e2e-go/features/stateproofs/stateproofs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,8 @@ func TestStateProofMessageCommitmentVerification(t *testing.T) {
consensusVersion := protocol.ConsensusVersion("test-fast-stateproofs")
consensusParams := getDefaultStateProofConsensusParams()
configurableConsensus[consensusVersion] = consensusParams
config.SetConfigurableConsensusProtocols(configurableConsensus)
oldConsensus := config.SetConfigurableConsensusProtocols(configurableConsensus)
defer config.SetConfigurableConsensusProtocols(oldConsensus)

var fixture fixtures.RestClientFixture
fixture.SetConsensus(configurableConsensus)
Expand Down
Loading