New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
optimize consensus code,modify return type when no error msg #821
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
overall, looks good to me.
except one case: err should be returned on 'start timer'
consensus/vbft/event_timer.go
Outdated
@@ -190,7 +187,7 @@ func (self *EventTimer) getEventTimeout(evtType TimerEventType) time.Duration { | |||
// | |||
// internal helper, should call with lock held | |||
// | |||
func (self *EventTimer) startEventTimer(evtType TimerEventType, blockNum uint32) error { | |||
func (self *EventTimer) startEventTimer(evtType TimerEventType, blockNum uint32) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggest changing the panic to 'return err'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
cb50c3b
to
acebc4e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good.
No description provided.