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

qa: Add wallet_encryption error tests #14813

Merged
merged 1 commit into from Nov 27, 2018

Conversation

Projects
None yet
5 participants
@MarcoFalke
Copy link
Member

commented Nov 26, 2018

The errors for empty passphrases are the help text of the RPC call, which is not very specific. Replace that with proper RPC errors and test them.

@MarcoFalke MarcoFalke added the Tests label Nov 26, 2018

@jamesob
Copy link
Member

left a comment

utACK fa739d4

Nice changeset. Seems like a less confusing user experience, good code cleanup, and adds test coverage.

@MarcoFalke MarcoFalke added this to the 0.18.0 milestone Nov 26, 2018

@DrahtBot

This comment has been minimized.

Copy link
Contributor

commented Nov 26, 2018

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Conflicts

Reviewers, this pull request conflicts with the following ones:

  • #14796 (rpc: Pass argument descriptions to RPCHelpMan by MarcoFalke)

If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

@promag
Copy link
Member

left a comment

Tested ACK fa739d4.

if (!pwallet->Unlock(strWalletPass)) {
throw JSONRPCError(RPC_WALLET_PASSPHRASE_INCORRECT, "Error: The wallet passphrase entered was incorrect.");
}
if (strWalletPass.empty()) {

This comment has been minimized.

Copy link
@promag

promag Nov 27, 2018

Member

I guess we shouldn't trim?

@meshcollider

This comment has been minimized.

Copy link
Member

commented Nov 27, 2018

utACK fa739d4

@MarcoFalke MarcoFalke merged commit fa739d4 into bitcoin:master Nov 27, 2018

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

MarcoFalke added a commit that referenced this pull request Nov 27, 2018

Merge #14813: qa: Add wallet_encryption error tests
fa739d4 qa: Add wallet_encryption error tests (MarcoFalke)

Pull request description:

  The errors for empty passphrases are the help text of the RPC call, which is not very specific. Replace that with proper RPC errors and test them.

Tree-SHA512: 3137e0f8f2e42a1f8ab1eeb57c99052557725f6f85139ff48c24acc8f3cf4087802de5216f3ce97375b291d21bddb7cd1379a6f280166136a306a0c9663bbd42

@MarcoFalke MarcoFalke deleted the MarcoFalke:Mf1811-qaWalletEncTest branch Nov 27, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.