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

wallet_rpc_server: error out if wallet-file and wallet-dir are both used #4337

Merged
merged 1 commit into from
Sep 14, 2018

Conversation

moneromooo-monero
Copy link
Collaborator

No description provided.

@jtgrassie
Copy link
Contributor

Can it not be a valid case to supply both parameters though? I.e. subsequent opens can use just a filename and the pre-supplied wallet-dir?

@moneromooo-monero
Copy link
Collaborator Author

Sure, that'd be OK too.

@el00ruobuob
Copy link
Contributor

@jtgrassie after further testing, when passing both --wallet-dir and --wallet-file parameter, it does not open the wallet.

@jtgrassie
Copy link
Contributor

@el00ruobuob my point is this... when a user supplies --wallet-dir, that should be used as the base for any relative wallet file arguments to RPC calls or --wallet-file. Supplying both arguments should be valid. If both are supplied and the file argument is relative, it's base path should use the dir argument. If the file argument is absolute, the dir argument can be ignored but stored for future RPC calls which get passed a wallet filename (for which the same above logic can apply).

@el00ruobuob
Copy link
Contributor

@jtgrassie i do agree with you, i'm just reporting the current behavior.

@hyc
Copy link
Collaborator

hyc commented Sep 5, 2018

@jtgrassie no. If you start with --wallet-file that means you want the server to only work with that single file. If you start with --wallet-dir that means you want to support multiple files. I wrote it this way to preserve compatibility with previous --wallet-file behavior.

@jtgrassie
Copy link
Contributor

@hyc Fair enough. That makes sense then.

@el00ruobuob
Copy link
Contributor

And I do understand the behavior. Thanks @hyc

Copy link
Contributor

@fluffypony fluffypony left a comment

Choose a reason for hiding this comment

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

Reviewed

@fluffypony fluffypony merged commit 97764ba into monero-project:master Sep 14, 2018
fluffypony added a commit that referenced this pull request Sep 14, 2018
97764ba wallet_rpc_server: error out if wallet-file and wallet-dir are both used (moneromooo-monero)
@stoffu stoffu mentioned this pull request Jun 4, 2020
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.

5 participants