fix consensus reactor tests for absent extension data

This commit is contained in:
William Banfield
2022-05-19 13:43:14 -04:00
parent 8c26a452b7
commit 8d9b227566
+6 -1
View File
@@ -686,7 +686,12 @@ func TestSwitchToConsensusVoteExtensions(t *testing.T) {
added, err := voteSet.AddVote(signedVote)
require.NoError(t, err)
require.True(t, added)
cs.blockStore.SaveBlockWithExtendedCommit(propBlock, blockParts, voteSet.MakeExtendedCommit())
if testCase.includeExtensions {
cs.blockStore.SaveBlockWithExtendedCommit(propBlock, blockParts, voteSet.MakeExtendedCommit())
} else {
cs.blockStore.SaveBlock(propBlock, blockParts, voteSet.MakeExtendedCommit().ToCommit())
}
reactor := NewReactor(
log.NewNopLogger(),
cs,