qa: Add wallet_encryption error tests #14813

pull MarcoFalke wants to merge 1 commits into bitcoin:master from MarcoFalke:Mf1811-qaWalletEncTest changing 2 files +18 −31
  1. MarcoFalke commented at 9:13 PM on November 26, 2018: member

    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.

  2. qa: Add wallet_encryption error tests fa739d4bd7
  3. MarcoFalke added the label Tests on Nov 26, 2018
  4. jamesob approved
  5. jamesob commented at 9:22 PM on November 26, 2018: member

    utACK https://github.com/bitcoin/bitcoin/pull/14813/commits/fa739d4bd735c21bc530f97272007e8695cb0ba3

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

  6. MarcoFalke added this to the milestone 0.18.0 on Nov 26, 2018
  7. DrahtBot commented at 10:48 PM on November 26, 2018: member

    <!--e57a25ab6845829454e8d69fc972939a-->

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

    <!--174a7506f384e20aa4161008e828411d-->

    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.

  8. in src/wallet/rpcwallet.cpp:2012 in fa739d4bd7
    2008 | @@ -2009,21 +2009,13 @@ static UniValue walletpassphrase(const JSONRPCRequest& request)
    2009 |          nSleepTime = MAX_SLEEP_TIME;
    2010 |      }
    2011 |  
    2012 | -    if (strWalletPass.length() > 0)
    2013 | -    {
    2014 | -        if (!pwallet->Unlock(strWalletPass)) {
    2015 | -            throw JSONRPCError(RPC_WALLET_PASSPHRASE_INCORRECT, "Error: The wallet passphrase entered was incorrect.");
    2016 | -        }
    2017 | +    if (strWalletPass.empty()) {
    


    promag commented at 3:46 PM on November 27, 2018:

    I guess we shouldn't trim?

  9. promag commented at 3:46 PM on November 27, 2018: member

    Tested ACK fa739d4.

  10. MarcoFalke merged this on Nov 27, 2018
  11. MarcoFalke closed this on Nov 27, 2018

  12. MarcoFalke referenced this in commit 8c119b2755 on Nov 27, 2018
  13. MarcoFalke deleted the branch on Nov 27, 2018
  14. deadalnix referenced this in commit dee5e745ae on Mar 26, 2020
  15. ftrader referenced this in commit 9fb1956b58 on Dec 1, 2020
  16. DrahtBot locked this on Sep 8, 2021
Labels

Milestone
0.18.0


github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-17 06:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me