```
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 [[https://github.com/bitcoin/bitcoin/pull/16943 | PR16943]].
Depends on D7983.