<p>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, <a href="https://blockexplorer.com/q/testnet/getblockcount" rel="nofollow">the difficulty is quite low</a>.</p>

<p>So yes, you can generate test coins on testnet.</p>

<p>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.</p>

CC BY-SA 3.0
2014-01-17T11:21:47.970Z
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
CC BY-SA 3.0
2014-01-17T12:03:45.133Z
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
CC BY-SA 3.0
2014-01-17T12:07:04.893Z
does regtest mode do what i want, maybe?
Jeff
CC BY-SA 3.0
2014-01-17T23:44:14.703Z
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
CC BY-SA 3.0
2014-01-18T07:07:02.463Z
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
CC BY-SA 3.0
2014-01-18T13:31:44.997Z
I'm not familiar with the `regtest` option, I'm sorry. It's also not mentioned on the [wiki page](https://en.bitcoin.it/wiki/Running_Bitcoin) 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
CC BY-SA 3.0
2014-01-19T16:51:42.333Z
Yes, that is where i saw it.
Jeff
CC BY-SA 3.0
2014-01-17T09:48:45.277Z
2014-01-17T09:48:45.277Z
Steven Roose
<p>Can you actually generate "test" coins using bitcoind and testnet?</p>

<p>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?</p>

<bitcoind>
gen option on bitcoind: testing
Jeff
# gen option on bitcoind: testing

(Asked by: username_0 on 2014-01-17)

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?

**Tags:** bitcoind


---

## 1 answers

### Answer by username_1 on 2014-01-17. Score: 0 | Accepted answer

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](https://blockexplorer.com/q/testnet/getblockcount).

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.

> **Comments:**
> **username_0**: 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?  
> **username_0**: 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"?  
> **username_0**: does regtest mode do what i want, maybe?  
> **username_1**: 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.  
> **username_0**: 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?  
> **username_1**: I'm not familiar with the `regtest` option, I'm sorry. It's also not mentioned on the [wiki page](https://en.bitcoin.it/wiki/Running_Bitcoin) 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  
> **username_0**: Yes, that is where i saw it.  

---

