(t *testing.T)
| 94 | } |
| 95 | |
| 96 | func TestRollbackNoBlocks(t *testing.T) { |
| 97 | const height = int64(100) |
| 98 | stateStore := setupStateStore(t, height) |
| 99 | blockStore := &mocks.BlockStore{} |
| 100 | blockStore.On("Height").Return(height) |
| 101 | blockStore.On("LoadBlockMeta", height).Return(nil) |
| 102 | blockStore.On("LoadBlockMeta", height-1).Return(nil) |
| 103 | |
| 104 | _, _, err := state.Rollback(blockStore, stateStore) |
| 105 | require.Error(t, err) |
| 106 | require.Contains(t, err.Error(), "block at height 99 not found") |
| 107 | } |
| 108 | |
| 109 | func TestRollbackDifferentStateHeight(t *testing.T) { |
| 110 | const height = int64(100) |
nothing calls this directly
no test coverage detected