Using the bitcoind -testnet test network and automatically creating test wallets

0

I am developing some bitcoin based services and I am interested of automatizing testing for them.

bitcoind seems to come with -testnet option. What are the best practices of using this?

  • How to create wallets for tests - should they be persistent or temporary

  • How to spoof balances of the wallets

  • How to make fake payments and how to debug them - does there exist anything akin blockchain.info or block chain explorer for them

Mikko Ohtamaa

Posted 2013-12-28T22:41:04.207

Reputation: 2 417

Answers

1

Each instance of bitcoind running with the testnet option creates its own wallet. You cannot spoof wallet balances, but you can mine coins on testnet with minimal hardware as the difficulty resets to zero (or 1) on a regular basis. You can also get testnet coins from faucets online. You create payments and addresses on testnet the very same way you would with the non-testnet version of bitcoin (either via the JSON RPC interface or CLI commands). Also blockexplorer for testnet is located here http://blockexplorer.com/testnet

Mark S.

Posted 2013-12-28T22:41:04.207

Reputation: 2 415

Can you recommend any way to automatically created testnet wallets with some balance, set by the unit test, on them?Mikko Ohtamaa 2013-12-28T23:32:42.607

I think you will manually have to create these wallets and send testnet coin to them I'm unaware of any way to automate the process.Mark S. 2013-12-28T23:36:30.297