-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Unify the work of runnable services #860
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Added initial implementation of `ServiceRunner`. Used `ServiceRunner` to implement `fuel_core_poa::Service`. Removed `fuel-core-bft` from `fuel-core` because we don't use it now.
Voxelot
reviewed
Dec 21, 2022
* Updated `TxPool` to use `ServiceRunner`. Removed `RWLock` and replaced it with `ParkingMutex`. Removed channels from `TxPool`. Tests are broken * Added first test * Added several tests * start refactoring trigger tests to use automock * missing change * Finally fixed tests for `PoA`. * Used `fuel_core_services::BoxStream` as a return value for methods `next_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. * move block importer events to stream. rename next_* streaming methods to event. * move stream re-exports under submodule * fix re-export Co-authored-by: Voxelot <brandonkite92@gmail.com>
xgreenx
commented
Dec 23, 2022
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.
Approve
Voxelot
approved these changes
Dec 23, 2022
xgreenx
added a commit
that referenced
this pull request
Jan 5, 2023
#875) The final change of #860 epic. Ref #809 Reworked `RunnableService` to be `RunnableService` and `RunnableTask`. `RunnableService::initialize` replaced with the `RunnableService::into_task` method. `into_task` returns a runnable task that implements the `RunnableTask` trait. `into_task` may return another type after initialization. Updated all services to implement new traits. Implemented GraphQL service via `ServiceRunner`. Extracted the graph QL logic into a separate module(preparation to move this service into its own crate). Re-used`ServiceRunner` for `FuelService`. Replaced `Modules` with `SharedState` and `SubServices`. Added a new `Starting` state of the service lifecycle. Added functions to allow to await `Started` or `Stop` state.
crypto523
pushed a commit
to crypto523/fuel-core
that referenced
this pull request
Oct 7, 2024
…` (#875) The final change of FuelLabs/fuel-core#860 epic. Ref FuelLabs/fuel-core#809 Reworked `RunnableService` to be `RunnableService` and `RunnableTask`. `RunnableService::initialize` replaced with the `RunnableService::into_task` method. `into_task` returns a runnable task that implements the `RunnableTask` trait. `into_task` may return another type after initialization. Updated all services to implement new traits. Implemented GraphQL service via `ServiceRunner`. Extracted the graph QL logic into a separate module(preparation to move this service into its own crate). Re-used`ServiceRunner` for `FuelService`. Replaced `Modules` with `SharedState` and `SubServices`. Added a new `Starting` state of the service lifecycle. Added functions to allow to await `Started` or `Stop` state.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Created a
fuel-core-services
crate to have common stuff of services.Added initial implementation of
ServiceRunner
.Used
ServiceRunner
to implementfuel_core_poa::Service
. Removedfuel-core-bft
fromfuel-core
because we don't use it now.