Skip to content

Commit

Permalink
fixed WALCrash skipping
Browse files Browse the repository at this point in the history
  • Loading branch information
torao committed Apr 17, 2020
1 parent ed623a2 commit c230b7c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 0 additions & 6 deletions consensus/replay_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,6 @@ func sendTxs(ctx context.Context, cs *State) {

// TestWALCrash uses crashing WAL to test we can recover from any WAL failure.
func TestWALCrash(t *testing.T) {
// FIXME
t.Skip("Temporarily excluded because this a case that doesn't end due to Proposer selection changes.")

testCases := []struct {
name string
initFn func(dbm.DB, *State, context.Context)
Expand Down Expand Up @@ -313,9 +310,6 @@ var modes = []uint{0, 1, 2}

// This is actually not a test, it's for storing validator change tx data for testHandshakeReplay
func TestSimulateValidatorsChange(t *testing.T) {
// FIXME
t.Skip("Temporarily excluded because this a case that doesn't end due to Proposer selection changes.")

nPeers := 7
nVals := 4
css, genDoc, config, cleanup := randConsensusNetWithPeers(
Expand Down
6 changes: 6 additions & 0 deletions consensus/state.go
Original file line number Diff line number Diff line change
Expand Up @@ -828,7 +828,13 @@ func (cs *State) enterNewRound(height int64, round int) {
logger.Info(fmt.Sprintf("enterNewRound(%v/%v). Current: %v/%v/%v", height, round, cs.Height, cs.Round, cs.Step))

// Select the current height and round Proposer
prevProposer := cs.Proposer
cs.Proposer = types.SelectProposer(cs.Validators, cs.state.LastProofHash, height, round)
if prevProposer == nil || !bytes.Equal(prevProposer.Address, cs.Proposer.Address) {
logger.Info(fmt.Sprintf("Changing Proposer: %+v -> %+v", prevProposer, cs.Proposer))
} else {
logger.Info(fmt.Sprintf("Current Proposer: %+v", cs.Proposer))
}

// Setup new round
// we don't fire newStep for this step,
Expand Down

0 comments on commit c230b7c

Please sign in to comment.