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

miner: don't update pending state when no transactions are added #19734

Merged
merged 2 commits into from
Jun 19, 2019

Conversation

holiman
Copy link
Contributor

@holiman holiman commented Jun 18, 2019

When the miner (not mining) receivew event feeds from the txpool, it tries to add it to the pending state. Most often, the pending state is already full, and new transactions does not actually make it into the pending block. If that happens, we can avoid updating the snapshot, which is a pretty expensive operations, creating a full new block (deep copying and hashing) and deep-copying the state.

@karalabe karalabe added this to the 1.9.0 milestone Jun 18, 2019
@holiman
Copy link
Contributor Author

holiman commented Jun 19, 2019

Added early check if pending block is full. Will put this up for comparison against master

Copy link
Member

@karalabe karalabe left a comment

Choose a reason for hiding this comment

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

LGTM

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.

2 participants