Skip to content

Conversation

@brunoerg
Copy link
Contributor

This PR adds test coverage for the following error:

if (pwallet->IsLegacy() && pwallet->IsWalletFlagSet(WALLET_FLAG_DISABLE_PRIVATE_KEYS)) {
throw JSONRPCError(RPC_WALLET_ERROR, "Error: Private keys are disabled for this wallet");
}

@DrahtBot
Copy link
Contributor

DrahtBot commented Dec 18, 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

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 18, 2022
@brunoerg brunoerg force-pushed the 2022-12-keypool-error-privatekey branch from fd0b35e to ec63a48 Compare December 19, 2022 01:01
@aureleoules
Copy link
Contributor

ACK ec63a48

maflcko pushed a commit that referenced this pull request Dec 19, 2022
…d throw an error

ec63a48 test: call `keypoolrefill` with private keys disabled should throw an error (brunoerg)

Pull request description:

  This PR adds test coverage for the following error:
  https://github.com/bitcoin/bitcoin/blob/cb32328d1b80d0ccd6eb9532bd8fe4e0a4de385e/src/wallet/rpc/addresses.cpp#L332-L334

ACKs for top commit:
  aureleoules:
    ACK ec63a48

Tree-SHA512: b5deda8981ff472f290e6e16c8723a58e02cbe099afd1f672c099f4add0a1d9b192b11a2c3f0e11b96794671f6b9efa75812b7a174248d7c58d7fd7d3310e7b9
@fanquake
Copy link
Member

Closing, as this has been merged. However wasn't this already covered in

msg = "Error: Private keys are disabled for this wallet"
?

@fanquake fanquake closed this Dec 19, 2022
@brunoerg
Copy link
Contributor Author

Closing, as this has been merged. However wasn't this already covered in

msg = "Error: Private keys are disabled for this wallet"
?

No, the error message is the same but the commands are different.

@aureleoules
Copy link
Contributor

sidhujag pushed a commit to syscoin/syscoin that referenced this pull request Dec 19, 2022
@bitcoin bitcoin locked and limited conversation to collaborators Dec 19, 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.

4 participants