Browse Source

little fix

pull/362/head
Ethan Buchman 8 years ago
parent
commit
ce0c638005
2 changed files with 3 additions and 3 deletions
  1. +2
    -2
      consensus/reactor_test.go
  2. +1
    -1
      consensus/state.go

+ 2
- 2
consensus/reactor_test.go View File

@ -265,7 +265,7 @@ func TestValidatorSetChanges(t *testing.T) {
// Check we can make blocks with skip_timeout_commit=false
func TestReactorWithTimeoutCommit(t *testing.T) {
N := 4
css := randConsensusNet(N, "consensus_reactor_with_timeout_commit_test", newMockTickerFunc(false))
css := randConsensusNet(N, "consensus_reactor_with_timeout_commit_test", newMockTickerFunc(false), newCounter)
// override default SkipTimeoutCommit == true for tests
for i := 0; i < N; i++ {
@ -302,7 +302,7 @@ func TestReactorWithTimeoutCommit(t *testing.T) {
timeoutWaitGroup(t, N-1, func(wg *sync.WaitGroup, j int) {
<-eventChans[j]
wg.Done()
})
}, css)
}
func waitForAndValidateBlock(t *testing.T, n int, activeVals map[string]struct{}, eventChans []chan interface{}, css []*ConsensusState, txs ...[]byte) {


+ 1
- 1
consensus/state.go View File

@ -1455,7 +1455,7 @@ func (cs *ConsensusState) addVote(vote *types.Vote, peerKey string) (added bool,
cs.enterPrecommit(height, vote.Round)
cs.enterCommit(height, vote.Round)
if cs.timeoutParams.SkipTimeoutCommit && cs.LastCommit.HasAll() {
if cs.timeoutParams.SkipTimeoutCommit && precommits.HasAll() {
// if we have all the votes now,
// go straight to new round (skip timeout commit)
// cs.scheduleTimeout(time.Duration(0), cs.Height, 0, RoundStepNewHeight)


Loading…
Cancel
Save