gen option on bitcoind: testing

2

Can you actually generate "test" coins using bitcoind and testnet?

I mean, in a standalone test environment, can the generation of "simulated" BTC be done and with very short test blockchain be done in a very short time?

Jeff

Posted 2014-01-17T09:12:41.227

Reputation: 213

Answers

0

Testnet is not a standalone test environment. It's an actual distributed block chain like the main chain. Only, because few people are mining on testnet, the difficulty is quite low.

So yes, you can generate test coins on testnet.

Beside this, it is possible to create a very own standalone test environment, but it would require you to edit the source code. Specifically, you will need to change the (hard coded) genesis block and most probably remove the peer seeds because you don't want to bother mainnet or testnet users with your own blocks.

Steven Roose

Posted 2014-01-17T09:12:41.227

Reputation: 10 855

Thanks. What I do not understand then is, when I issue the command: ./bitcoind -datadir=1 what is in the directory referred to? I had thought it was a "test" blockchain located only on my machine. Is that wrong and if it is, can't something like this be done?Jeff 2014-01-17T11:21:47.970

I see that you are saying that the only way I can do what I am asking is changing the code. So what is in datadir 1 and 2 is in fact the entire "test blockchain"?Jeff 2014-01-17T12:03:45.133

does regtest mode do what i want, maybe?Jeff 2014-01-17T12:07:04.893

The -datadir option is for specifying the directory. So f.e. -datadir=/home/myuser/.bitcoin for Linux. If you you want you data to be stored in a non-default folder, you should use this. To use testnet, you need to use the -testnet option.Steven Roose 2014-01-17T23:44:14.703

Okay. But the regtest mode: Am I right in saying that this gives one the opportunity to specify an arbitrarily short blockchain that originates on one's own machine and so doing things like generating test coins can be done extremely fast?Jeff 2014-01-18T07:07:02.463

I'm not familiar with the regtest option, I'm sorry. It's also not mentioned on the wiki page where the other command line options are listed. Maybe this can help you: it's the pull request where regtest has been accepted to the code: https://github.com/bitcoin/bitcoin/pull/2632

Steven Roose 2014-01-18T13:31:44.997

Yes, that is where i saw it.Jeff 2014-01-19T16:51:42.333