monero-project / monero

Monero: the secure, private, untraceable cryptocurrency
https://getmonero.org
Other
8.93k stars 3.1k forks source link

Add `generate_blocks addr numblocks [starting_nonce]` command to monerod when in regtest mode #8397

Open LeoNero opened 2 years ago

LeoNero commented 2 years ago

When in --regtest, monerod provides a RPC call generateblocks that receives as parameters: amount_of_blocks, wallet_address, and starting_nonce. This is really useful when you don't want to keep mining all the time when testing and only mine blocks when you need/want to.

However, having to call it using curl/httpie in another terminal gets boring and annoying really fast, especially since, when testing, I do not want to run monerod in the background (i.e no --detach flag) . So I would suggest having a command generate_blocks on monerod that receives the same arguments (but makes starting_nonce optional for simplicity).

Such command would only be available if --regtest was passed when initializing monerod.

LeoNero commented 2 years ago

I am down to implement this feature.

meglio commented 8 months ago

Any updates?