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

Minor code improvements - WIP #208

Draft
wants to merge 5 commits into
base: develop
Choose a base branch
from

Conversation

cyberbono3
Copy link
Collaborator

No description provided.

gossip/emitter/control.go Outdated Show resolved Hide resolved
gossip/emitter/emitter.go Outdated Show resolved Hide resolved
gossip/emitter/sync.go Outdated Show resolved Hide resolved
gossip/emitter/txs.go Outdated Show resolved Hide resolved
gossip/emitter/control.go Outdated Show resolved Hide resolved
gossip/emitter/control.go Outdated Show resolved Hide resolved
// short circuit if not a validator
return nil, nil
}
sortedTxs := em.getSortedTxs()

if em.world.IsBusy() {
Copy link
Collaborator

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)

Copy link
Collaborator Author

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.

@cyberbono3
Copy link
Collaborator Author

@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.

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

2 participants