Conversation
There was a problem hiding this comment.
Instead of select { internal <-; <-timeout }, how about select { internal <-; default CList.PushBack(msg) } ? We can shuffle more from CList to internalMsgQueue on the bottom of receiveMessage routine's for-loop.
We don't want to wait 10 milliseconds on things, and launching a new goroutine would make the order of sends to internalMsgQueue nondeterministic.
There was a problem hiding this comment.
thats interesting. my thinking was two fold:
- we should almost never fail to send on internal, because it has a large buffer and the receiveRoutine select should be balanced
- we don't get determinism anyways until after something is read in the receiveRoutine
agree 10 ms might be too much in the event we are backlogged. so we could just use "default: go internal<-"
There was a problem hiding this comment.
It would be confusing to see internalMsgQueue items out of order, e.g. a precommit before a prevote. At least we can make the order of messages in internalMsgQueue deterministic.
But I think that's fine too.
consensus/state.go
Outdated
There was a problem hiding this comment.
s/1/RoundStepNewHeight/g
b22e01d to
9dea953
Compare
consensus/reactor.go
Outdated
There was a problem hiding this comment.
Yeah maybe SetEventSwitch where possible? Probably everywhere now since we're not using the cache, yeah?
Creating pull for comments