How to mine continuously in segtest of version bitcoin-0.20? #22816

issue jiebanghan opened this issue on August 27, 2021
  1. jiebanghan commented at 7:32 AM on August 27, 2021: none

    Hello, I am just learning the bitcoin codes of version bitcoin-0.20 and I make it successfully. Additionlly, I have only one PC. I want to mine continuously in segtest ,however I only found methods below:

    == Generating ==
    generatetoaddress nblocks "address" ( maxtries )
    generatetodescriptor num_blocks "descriptor" ( maxtries )
    

    But these methods can't mine continuously. Hence would you please tell my how to mine continuously in segtest of version bitcoin-0.20?

    Thank you very much.

  2. MarcoFalke commented at 8:02 AM on August 27, 2021: member

    In regtest you can write a loop to mine blocks with a delay:

    while sleep 600; do bitcoin-cli generatetoaddress 1 foobar ; done
    
  3. MarcoFalke closed this on Aug 27, 2021

  4. MarcoFalke commented at 8:02 AM on August 27, 2021: member

    Usually the issue tracker is used to track technical issues related to the Bitcoin Core code base. General bitcoin questions and/or support requests are best directed to the Bitcoin StackExchange or the #bitcoin IRC channel on Libera Chat.

  5. jiebanghan commented at 8:15 AM on August 27, 2021: none

    Thank you @MarcoFalke very much.

  6. fanquake locked this on Aug 27, 2021
  7. fanquake added the label Questions and Help on Aug 27, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-26 06:14 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me