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

linera-service: move wallet-only operations out of ClientContext #2120

Merged
merged 1 commit into from
Jun 12, 2024

Conversation

Twey
Copy link
Contributor

@Twey Twey commented Jun 11, 2024

Motivation

In the future, ClientContext will contain a Client, and therefore will not be constructible until a storage client is available.

Proposal

Instead of constructing a ClientContext to do wallet operations in the CLI, just construct a WalletState (a persisted wallet file) instead.

Test Plan

CI.

Release Plan

No user-visible changes.

Links

@Twey Twey force-pushed the 06-11-Use_WalletState branch 5 times, most recently from f03f018 to 33181d6 Compare June 12, 2024 13:58
@Twey Twey marked this pull request as ready for review June 12, 2024 15:58
@@ -195,7 +147,7 @@ impl ClientContext {
#[cfg(feature = "rocksdb")]
None => {
let storage_config = linera_service::storage::StorageConfig::RocksDb {
path: Self::create_default_config_path()?.join("wallet.db"),
Copy link
Contributor

Choose a reason for hiding this comment

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

(Was that a bug?)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't think so — there's currently no way to change the config path, so the code is equivalent. But we have such a way for the wallet path, so I thought I might as well move this one so we're ready when we inevitably make it configurable :)

@Twey Twey merged commit e18b349 into linera-io:main Jun 12, 2024
3 checks passed
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