Skip to content

Commit

Permalink
checking message not nil before processing
Browse files Browse the repository at this point in the history
  • Loading branch information
tok-kkk committed Sep 10, 2021
1 parent 0c4e34f commit dacda95
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions mq/mq.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ func New(opts Options) MessageQueue {
func (mq *MessageQueue) Consume(h process.Height, propose func(process.Propose), prevote func(process.Prevote), precommit func(process.Precommit), procsAllowed map[id.Signatory]bool) (n int) {
for from, q := range mq.queuesByPid {
for len(q) > 0 {
if q[0] == nil || height(q[0]) > h {
break
}

func() {
defer func() {
n++
Expand Down

0 comments on commit dacda95

Please sign in to comment.