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

Refactored TxPool (& related mocks) + BoxStream based events #863

Merged
merged 10 commits into from
Dec 23, 2022

Conversation

xgreenx
Copy link
Collaborator

@xgreenx xgreenx commented Dec 22, 2022

  • Updated TxPool to use ServiceRunner.
  • Removed RWLock and replaced it with ParkingMutex.
  • Removed channels from TxPool.
  • Used BoxStream instead of next_*, to avoid needing ports to be mutable
  • Refactored PoA trigger tests to use automocks
  • Split PoA trigger tests into smaller ones (and found a bug)
  • Removed some unused methods from the txpool.
  • select_transactions now removes transactions from the pool so that they aren't selected by block production again (since the import event is async and may not be processed by the txpool in time). There is a todo to address the need to have a different way to remove txs from the pool without recursively removing dependencies.

Removed `RWLock` and replaced it with `ParkingMutex`.
Removed channels from `TxPool`.

Tests are broken
@xgreenx xgreenx requested a review from a team December 22, 2022 01:38
@xgreenx xgreenx self-assigned this Dec 22, 2022
xgreenx and others added 7 commits December 22, 2022 02:50
…ext_transaction_status_update` and `next_gossiped_transaction`. Now those methods are sync and requires `&self` instead of `&mut self`.

Updated the code to work with those stream.
rename next_* streaming methods to event.
@Voxelot Voxelot marked this pull request as ready for review December 23, 2022 02:25
@Voxelot Voxelot changed the title Updated TxPool to use ServiceRunner. Refactored TxPool (& related mocks) + BoxStream based events Dec 23, 2022
@Voxelot Voxelot merged commit 05a4b27 into feature/service-runner Dec 23, 2022
@Voxelot Voxelot deleted the feature/service-runner-txpool-refactor branch December 23, 2022 02:59
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