bitcoind rpc interface, generate method deprecated in version 0.19.0 (latest) How to generate a block in the new version of bitcoind.


  bitcoin-cli -regtest generate 1


The above command no longer works with the latest bitcoind package

I want to confirm a transaction I have executed under the regtest mode for bitcoind, hence generating a block to confirm the tx.
generate was deprecated and removed in favor of generatetoaddress.