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

Fix a spurious warning message #132

Merged
merged 1 commit into from Nov 16, 2020
Merged

Fix a spurious warning message #132

merged 1 commit into from Nov 16, 2020

Conversation

johnsonjh
Copy link

@johnsonjh johnsonjh commented Nov 1, 2020

Fixes a spurious warning message. In the case where pktctl is being used to control a pktd and/or pktwallet process not owned by the current user (but obviously on the same system), with any necessary RPC parameters specified as command-line options, then no warning message should be printed about being unable to read the RPC password from the users $HOME/.pktwallet directory - simply check to see if a password was specified before warning about it.

 » pktctl --notls --rpcuser=XXXX --rpcpass=XXXX --wallet getbalance
Warning: unable to get rpc password from path [/home/myuser/.pktwallet]
3031.8219427987933

With the patch:

 » pktctl --notls --rpcuser=XXXX --rpcpass=XXXX --wallet getbalance
3032.8619421137921

In this case, pktd is running as user pktd_ and pktwallet is running as user pktw_, and the user executing pktctl has neither a $HOME/.pktd or a $HOME/.pktwallet directory, nor is their existence necessary.

@cjdelisle cjdelisle merged commit ab348b9 into pkt-cash:develop Nov 16, 2020
@johnsonjh johnsonjh deleted the rpcpasserr branch December 28, 2020 23:51
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.

None yet

2 participants