mirror of
https://github.com/tendermint/tendermint.git
synced 2026-04-21 08:10:31 +00:00
fixes1
This commit is contained in:
@@ -356,9 +356,7 @@ func TestSwitchToConsensusVoteExtensions(t *testing.T) {
|
||||
},
|
||||
} {
|
||||
t.Run(testCase.name, func(t *testing.T) {
|
||||
ctx, cancel := context.WithTimeout(context.Background(), time.Second*15)
|
||||
defer cancel()
|
||||
cs, vs := makeState(ctx, t, makeStateArgs{validators: 1})
|
||||
cs, vs := randState(1)
|
||||
validator := vs[0]
|
||||
validator.Height = testCase.storedHeight
|
||||
|
||||
|
||||
@@ -1796,10 +1796,6 @@ func TestVoteExtensionEnableHeight(t *testing.T) {
|
||||
},
|
||||
} {
|
||||
t.Run(testCase.name, func(t *testing.T) {
|
||||
config := configSetup(t)
|
||||
ctx, cancel := context.WithCancel(context.Background())
|
||||
defer cancel()
|
||||
|
||||
numValidators := 3
|
||||
m := abcimocks.NewApplication(t)
|
||||
m.On("ProcessProposal", mock.Anything, mock.Anything).Return(&abci.ResponseProcessProposal{
|
||||
@@ -1818,7 +1814,8 @@ func TestVoteExtensionEnableHeight(t *testing.T) {
|
||||
m.On("Commit", mock.Anything).Return(&abci.ResponseCommit{}, nil).Maybe()
|
||||
c := test.ConsensusParams()
|
||||
c.ABCI.VoteExtensionsEnableHeight = testCase.enableHeight
|
||||
cs1, vss := makeState(ctx, t, makeStateArgs{config: config, application: m, validators: numValidators, consensusParams: c})
|
||||
//consensusParams: c})
|
||||
cs1, vss := randStateWithApp(numValidators, m)
|
||||
cs1.state.ConsensusParams.ABCI.VoteExtensionsEnableHeight = testCase.enableHeight
|
||||
height, round := cs1.Height, cs1.Round
|
||||
|
||||
|
||||
@@ -118,7 +118,7 @@ func TestRollbackHard(t *testing.T) {
|
||||
|
||||
partSet, err := block.MakePartSet(types.BlockPartSizeBytes)
|
||||
require.NoError(t, err)
|
||||
blockStore.SaveBlock(block, partSet, &types.ExtendedCommit{Height: block.Height})
|
||||
blockStore.SaveBlock(block, partSet, &types.Commit{Height: block.Height})
|
||||
|
||||
currState := state.State{
|
||||
Version: tmstate.Version{
|
||||
@@ -160,7 +160,7 @@ func TestRollbackHard(t *testing.T) {
|
||||
|
||||
nextPartSet, err := nextBlock.MakePartSet(types.BlockPartSizeBytes)
|
||||
require.NoError(t, err)
|
||||
blockStore.SaveBlock(nextBlock, nextPartSet, &types.ExtendedCommit{Height: nextBlock.Height})
|
||||
blockStore.SaveBlock(nextBlock, nextPartSet, &types.Commit{Height: nextBlock.Height})
|
||||
|
||||
rollbackHeight, rollbackHash, err := state.Rollback(blockStore, stateStore, true)
|
||||
require.NoError(t, err)
|
||||
@@ -173,7 +173,7 @@ func TestRollbackHard(t *testing.T) {
|
||||
require.Equal(t, currState, loadedState)
|
||||
|
||||
// resave the same block
|
||||
blockStore.SaveBlock(nextBlock, nextPartSet, &types.ExtendedCommit{Height: nextBlock.Height})
|
||||
blockStore.SaveBlock(nextBlock, nextPartSet, &types.Commit{Height: nextBlock.Height})
|
||||
|
||||
params.Version.App = 11
|
||||
|
||||
|
||||
Reference in New Issue
Block a user