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

refactor(node-builder): use datadir provided by the config #8592

Merged
merged 5 commits into from
Jun 4, 2024

Conversation

shekhirin
Copy link
Collaborator

Now that we have datadir arguments inside the node config with #7212, we can grab the datadir path directly from there.

@shekhirin shekhirin added C-debt A clean up/refactor of existing code A-sdk Related to reth's use as a library labels Jun 4, 2024
@shekhirin shekhirin force-pushed the alexey/node-config-datadir branch from c005a3d to c745eaa Compare June 4, 2024 14:35
@shekhirin shekhirin force-pushed the alexey/node-config-datadir branch from c745eaa to 087b9d3 Compare June 4, 2024 14:50
@shekhirin shekhirin marked this pull request as ready for review June 4, 2024 17:07
@shekhirin shekhirin force-pushed the alexey/node-config-datadir branch from 14fab24 to 554c024 Compare June 4, 2024 17:15
Copy link
Collaborator

@mattsse mattsse left a comment

Choose a reason for hiding this comment

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

no semicolons good, let's see how long that lasts lol

@@ -183,7 +183,7 @@ impl<Ext: clap::Args + fmt::Debug> NodeCommand<Ext> {

let builder = NodeBuilder::new(node_config)
.with_database(database)
.with_launch_context(ctx.task_executor, data_dir);
.with_launch_context(ctx.task_executor);
Copy link
Collaborator

Choose a reason for hiding this comment

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

that's awesome

@@ -266,7 +266,7 @@ where
Err(EthApiError::InvalidTransaction(RpcInvalidTransactionError::GasTooHigh))
if tx_request_gas_limit.is_some() || tx_request_gas_price.is_some() =>
{
return Err(self.map_out_of_gas_err(block_env_gas_limit, env, &mut db));
return Err(self.map_out_of_gas_err(block_env_gas_limit, env, &mut db))
Copy link
Collaborator

Choose a reason for hiding this comment

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

-.-

@shekhirin shekhirin added this pull request to the merge queue Jun 4, 2024
task_executor: TaskExecutor,
) -> WithLaunchContext<NodeBuilder<Arc<TempDatabase<DatabaseEnv>>>> {
let path = MaybePlatformPath::<DataDirPath>::from(tempdir_path());
self.config.datadir.datadir = path.clone();
Copy link
Collaborator

Choose a reason for hiding this comment

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

can we add setter for this on NodeConfig @shekhirin

@shekhirin shekhirin removed this pull request from the merge queue due to a manual request Jun 4, 2024
@shekhirin shekhirin added this pull request to the merge queue Jun 4, 2024
Merged via the queue into main with commit ae9ab69 Jun 4, 2024
30 checks passed
@shekhirin shekhirin deleted the alexey/node-config-datadir branch June 4, 2024 18:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-sdk Related to reth's use as a library C-debt A clean up/refactor of existing code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants