-
Notifications
You must be signed in to change notification settings - Fork 262
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
Minor code improvements - WIP #208
base: develop
Are you sure you want to change the base?
Minor code improvements - WIP #208
Conversation
gossip/emitter/emitter.go
Outdated
// short circuit if not a validator | ||
return nil, nil | ||
} | ||
sortedTxs := em.getSortedTxs() | ||
|
||
if em.world.IsBusy() { |
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.
It may make sense to leave the check closer to em.world.Lock()
to reduce the chance of locking the mutex when there's an active block processing. The reason why we bother with IsBusy
check is because em.world.Lock
will lock engine mutex and then wait until block processing is complete (if any). That will make engine mutex unavailable while we're waiting for completion of block processing (in a case if it's running)
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.
I get your point. Reverting my changes.
64c315a
to
6f651f8
Compare
5b88a47
to
08aeb74
Compare
@uprendis I have addressed your comments. I will continue working on it as soon as I have compete tasks with higher priority. Let us leave in draft for now. |
No description provided.