-
Notifications
You must be signed in to change notification settings - Fork 24
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
feat: add state pruner #161
base: master
Are you sure you want to change the base?
Conversation
incorporated into the bundle
@@ -21,7 +23,7 @@ pub async fn launch_api_server( | |||
config: &Config, | |||
internal_config: &Internal, | |||
metrics_registry: Registry, | |||
storage: impl Storage + 'static + Clone, | |||
storage: impl services::status_reporter::port::Storage + Clone + 'static, |
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.
Ideally this should be a driving/incoming port. But we're probably not going to do that now.
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.
I would like to do this in another PR.
@@ -140,8 +146,11 @@ pub fn block_importer( | |||
cancel_token: CancellationToken, | |||
config: &config::Config, | |||
) -> tokio::task::JoinHandle<()> { | |||
let block_importer = | |||
services::BlockImporter::new(storage, fuel, config.app.bundle.block_height_lookback); | |||
let block_importer = services::block_importer::service::BlockImporter::new( |
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.
Haven't seen all of the code yet, would it be cleaner if you reexported this so the use path here is services::BlockImporter
?
Co-authored-by: Ahmed Sagdati <[email protected]>
Adds the
state_pruner
service which will delete entries older that a certain retention duration from the db.Additional refactoring done in this PR:
adapters
foldertest-helpers
crate