2

I wanted to try generateblocks in regtest mode. It works, blocks get generated. Using the RPC call get_last_block_header I can see new blocks and their heights.

Problem is that after monerod restarts, all blocks get lost. It shows initial block at height 0, nothing else. It happens even if I enter save and exit commands manually, instead of traditional ^D. I'm using the latest version, v0.17.3.0 on Ubuntu. I ran monerod with log-level 3 but didn't find any errors. It happens to the blocks generated by the traditional way (start_mining) as well.

I tried to start a new blockchain in testnet mode and all works correctly (blocks get saved).

What am I doing wrong? Or, what's wrong with regtest?

1 Answer 1

1

You need to use the parameter --keep-fakechain if you want to keep a regtest blockchain.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.