Skip to content

Commit

Permalink
FAB-1192 timer should be reset each pop
Browse files Browse the repository at this point in the history
https://jira.hyperledger.org/browse/FAB-1192

Missing timer reset causes broadcast transactions to
be not cut into blocks.

Change-Id: Id6efbd18e307d43889a3703503305d3ee46bd6a1
Signed-off-by: Srinivasan Muralidharan <muralisr@us.ibm.com>
  • Loading branch information
Srinivasan Muralidharan committed Nov 23, 2016
1 parent 7c9ab1e commit b1ecf80
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion orderer/solo/consensus.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import (
"github.com/hyperledger/fabric/orderer/common/configtx"
"github.com/hyperledger/fabric/orderer/rawledger"
cb "github.com/hyperledger/fabric/protos/common"

"github.com/op/go-logging"
)

Expand Down Expand Up @@ -88,6 +87,9 @@ func (bs *consenter) main() {
bs.rl.Append(batch, nil)
}
case <-timer:
//clear the timer
timer = nil

batch := bs.cutter.Cut()
if len(batch) == 0 {
logger.Warningf("Batch timer expired with no pending requests, this might indicate a bug")
Expand Down

0 comments on commit b1ecf80

Please sign in to comment.