Skip to content

Conversation

@brunoerg
Copy link
Contributor

This PR adds test coverage for the following error:

if (!WALLET_FLAG_MAP.count(flag_str)) {
throw JSONRPCError(RPC_INVALID_PARAMETER, strprintf("Unknown wallet flag: %s", flag_str));
}

https://marcofalke.github.io/btc_cov/total.coverage/src/wallet/rpc/wallet.cpp.gcov.html

@DrahtBot
Copy link
Contributor

DrahtBot commented Dec 21, 2022

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

Reviews

See the guideline for information on the review process.

Type Reviewers
ACK aureleoules
Concept ACK kevkevinpal

If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

@DrahtBot DrahtBot added the Tests label Dec 21, 2022
@kevkevinpal
Copy link
Contributor

Tested ACK

tested on my local machine

git log -1
commit 3666a06730b2229e5af24124e6ef0403e4a6792e (HEAD -> PR26738)
Author: brunoerg <brunoely.gc@gmail.com>
Date:   Wed Dec 21 11:03:24 2022 -0300

    test: add coverage for unknown wallet flag in `setwalletflag`

test/functional/wallet_avoidreuse.py
2022-12-24T17:08:09.612000Z TestFramework (INFO): Initializing test directory /var/folders/9g/cvx014yx4dq5lwl_x5zvn_j80000gn/T/bitcoin_func_test_bo0btz_x
2022-12-24T17:08:11.499000Z TestFramework (INFO): Test wallet files persist avoid_reuse flag
2022-12-24T17:08:12.315000Z TestFramework (INFO): Test immutable wallet flags
2022-12-24T17:08:13.502000Z TestFramework (INFO): Test that change doesn't turn into non-change when spent
2022-12-24T17:08:13.568000Z TestFramework (INFO): Test sending from reused address with avoid_reuse=false
2022-12-24T17:08:14.647000Z TestFramework (INFO): Test sending from reused legacy address fails
2022-12-24T17:08:14.695000Z TestFramework (INFO): Test sending from reused p2sh-segwit address fails
2022-12-24T17:08:14.726000Z TestFramework (INFO): Test sending from reused bech32 address fails
2022-12-24T17:08:14.761000Z TestFramework (INFO): Test getbalances used category
2022-12-24T17:08:15.988000Z TestFramework (INFO): Test that full destination groups are preferred in coin selection
2022-12-24T17:08:16.545000Z TestFramework (INFO): Test that all destination groups are used
2022-12-24T17:08:18.862000Z TestFramework (INFO): Stopping nodes
2022-12-24T17:08:19.243000Z TestFramework (INFO): Cleaning up /var/folders/9g/cvx014yx4dq5lwl_x5zvn_j80000gn/T/bitcoin_func_test_bo0btz_x on exit
2022-12-24T17:08:19.244000Z TestFramework (INFO): Tests successful

Copy link
Contributor

@aureleoules aureleoules left a comment

Choose a reason for hiding this comment

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

ACK 3666a06

@maflcko maflcko merged commit 3b6e0f0 into bitcoin:master Dec 29, 2022
sidhujag pushed a commit to syscoin/syscoin that referenced this pull request Dec 29, 2022
…etwalletflag`

3666a06 test: add coverage for unknown wallet flag in `setwalletflag` (brunoerg)

Pull request description:

  This PR adds test coverage for the following error:
  https://github.com/bitcoin/bitcoin/blob/6d40a1a7e7f09ff2c32e53237f968adf8300d028/src/wallet/rpc/wallet.cpp#L275-L277

  https://marcofalke.github.io/btc_cov/total.coverage/src/wallet/rpc/wallet.cpp.gcov.html

ACKs for top commit:
  aureleoules:
    ACK 3666a06

Tree-SHA512: b6b2415442dfbc2404aed9720cc899995686007d6ba222dae461d064e4454d5af1326d3d527770b51b1005721ac42a49972f1eabf21108f656c30d3584790747
@bitcoin bitcoin locked and limited conversation to collaborators Dec 29, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants