|
October 19, 2013, 12:07:26 PM |
|
We need developer documentation on bitcoin.org
The right way to test apps locally these days is not to use the testnet at all. Instead build from git master and use regression test mode. It has (yet another) genesis block and set of parameters, however, in regtest mode:
1) Difficulty is set so low a new block can be mined on a CPU instantly.
2) The "bitcoind -regtest setgenerate true" command will mine a single block and then stop.
This means that if you connect your app to a local regtest mode node, you can get a block whenever you want, only when you want, without having to wait.
If you combine this feature with the blacklist block RPC that Pieter Wiulle has put in a github pull req, you can also trigger arbitrary re-orgs whenever you like, which is great for testing that your app behaves correctly in the presence of re-orgs (otherwise this is hard to test properly).
|