Skip to content

Conversation

@maflcko
Copy link
Member

@maflcko maflcko commented Sep 23, 2019

The existing generatetoaddress RPC can only generate to scriptPubKeys that can be represented by an address. However, raw scripts (such as OP_TRUE) or P2PK can not be represented by an address, which complicates testing.

@maflcko
Copy link
Member Author

maflcko commented Sep 23, 2019

This has also been requested by @harding (https://twitter.com/hrdng/status/1101924904990056448). And everyone who liked that tweet, obviously.

@instagibbs
Copy link
Member

concept ACK

@DrahtBot
Copy link
Contributor

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

Conflicts

Reviewers, this pull request conflicts with the following ones:

  • #16365 (Log RPC parameters (arguments) if -debug=rpcparams by LarryRuane)

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.

Copy link
Contributor

@promag promag left a comment

Choose a reason for hiding this comment

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

Concept ACK.

@laanwj
Copy link
Member

laanwj commented Sep 25, 2019

I'm a bit ambivalent about extending the internal miner after so much effort over time to reduce it or even get rid of it. But if this helps testing, sure, concept ACK.

@fjahr
Copy link
Contributor

fjahr commented Sep 26, 2019

tested ACK
Ran tests and also did some manual testing.

@maflcko maflcko force-pushed the 1909-rpcMiningDescriptor branch from fa64e2d to fada009 Compare September 26, 2019 20:16
Copy link
Member

Choose a reason for hiding this comment

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

As it is test-only, it should probably be hidden from the normal help.

Copy link
Member Author

Choose a reason for hiding this comment

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

generatetoaddress isn't hidden, so I used the same. Otherwise it would also be missing from the gui-autocomplete.

@laanwj laanwj added this to the 0.20.0 milestone Oct 1, 2019
@maflcko maflcko removed this from the 0.20.0 milestone Oct 18, 2019
@laanwj
Copy link
Member

laanwj commented Oct 30, 2019

Needs update after #17192, I guess.

@maflcko maflcko force-pushed the 1909-rpcMiningDescriptor branch from fada009 to fa144e6 Compare October 30, 2019 14:03
@maflcko
Copy link
Member Author

maflcko commented Oct 30, 2019

Rebased for CHECK_NONFATAL

@laanwj
Copy link
Member

laanwj commented Oct 30, 2019

ACK fa144e6

laanwj added a commit that referenced this pull request Oct 30, 2019
fa144e6 rpc: Add generatetodescriptor (MarcoFalke)

Pull request description:

  The existing `generatetoaddress` RPC can only generate to scriptPubKeys that can be represented by an address. However, raw scripts (such as `OP_TRUE`) or P2PK can not be represented by an address, which complicates testing.

ACKs for top commit:
  laanwj:
    ACK fa144e6

Tree-SHA512: aee934ab7e33f07c81f3b4c8ec23e7b6ddf63a1f4b86051af0bd76b75d8da1f51627cc682e5c6e42582340ca576bbf8ff724bdd43f87128ccecfa91e52d30ae7
@laanwj laanwj merged commit fa144e6 into bitcoin:master Oct 30, 2019
@maflcko maflcko deleted the 1909-rpcMiningDescriptor branch October 30, 2019 14:41
jasonbcox pushed a commit to Bitcoin-ABC/bitcoin-abc that referenced this pull request Oct 19, 2020
Summary:
```
The existing generatetoaddress RPC can only generate to scriptPubKeys
that can be represented by an address. However, raw scripts (such as
OP_TRUE) or P2PK can not be represented by an address, which complicates
testing.
```

Backport of core [[bitcoin/bitcoin#16943 | PR16943]].

Depends on D7983.

Test Plan:
  ninja all check-all

Reviewers: #bitcoin_abc, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

Differential Revision: https://reviews.bitcoinabc.org/D7984
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Dec 16, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants