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

[TxPool] Reduce lock time in resetAccounts #459

Merged
merged 14 commits into from
Mar 30, 2022

Conversation

dbrajovic
Copy link
Contributor

@dbrajovic dbrajovic commented Mar 14, 2022

Description

Fixes EDGE-434

This PR reduces the amount of time account lock(s) are held during resetAccounts.

Changes include

  • Bugfix (non-breaking change that solves an issue)
  • Hotfix (change that solves an urgent issue, and requires immediate attention)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (change that is not backwards-compatible and/or changes current functionality)

Checklist

  • I have assigned this PR to myself
  • I have added at least 1 reviewer
  • I have added the relevant labels
  • I have updated the official documentation
  • I have added sufficient documentation in code

Testing

  • I have tested this code with the official test suite
  • I have tested this code manually

@dbrajovic dbrajovic changed the title Hotfix/txpool reset accounts [TxPool] Reduce lock time in resetAccounts Mar 14, 2022
@dbrajovic dbrajovic self-assigned this Mar 14, 2022
@dbrajovic dbrajovic added the feature New update to Polygon Edge label Mar 14, 2022
@dbrajovic dbrajovic marked this pull request as ready for review March 15, 2022 08:06
txpool/account.go Outdated Show resolved Hide resolved
Copy link
Contributor

@zivkovicmilos zivkovicmilos left a comment

Choose a reason for hiding this comment

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

Believe it or not I couldn't find anything to nitpick with the PR 🙂

I was about to write a comment on the lock release order, but then realized go runs defers in LIFO order.

Looks great, please check out @Kourin1996's comment for a minor optimization 💯

Copy link
Contributor

@Kourin1996 Kourin1996 left a comment

Choose a reason for hiding this comment

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

LGTM

@dbrajovic dbrajovic merged commit cc56e29 into develop Mar 30, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Mar 30, 2022
@dbrajovic dbrajovic deleted the hotfix/txpool-reset-accounts branch March 30, 2022 08:49
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature New update to Polygon Edge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants