Skip to content
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

Merged
merged 2 commits into from Apr 8, 2019

Conversation

xiemylogos
Copy link
Contributor

No description provided.

Copy link
Member

@Honglei-Cong Honglei-Cong left a 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'

@@ -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) {
Copy link
Member

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'

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

Copy link
Member

@Honglei-Cong Honglei-Cong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good.

@laizy laizy merged commit 81aa349 into ontio:master Apr 8, 2019
laizy pushed a commit to laizy/ontology that referenced this pull request May 9, 2019
lucas7788 pushed a commit to lucas7788/ontology that referenced this pull request Jun 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants