BitcoinPrivate-legacy/doc/testnet.md

34 lines
1018 B
Markdown
Raw Normal View History

2018-02-23 19:34:15 -08:00
2018-02-23 19:36:14 -08:00
Connecting to testnet
2018-02-23 19:34:15 -08:00
==========================================================
2018-02-23 19:36:14 -08:00
After building Bitcoin private, you should have two binaries (btcpd, and btcp-cli) on your build target directory, but before running the btcp, you need to configure it:
2018-02-23 19:34:15 -08:00
2018-02-23 19:36:14 -08:00
### Linux
2018-02-23 19:34:15 -08:00
2018-02-23 19:36:14 -08:00
1. Create a btcprivate.conf file
2018-02-23 19:34:15 -08:00
2018-02-23 19:36:14 -08:00
```
vi ~/.btcprivate/btcprivate.conf
```
2018-02-23 19:34:15 -08:00
2018-02-23 19:36:14 -08:00
2. Add the following to the conf file
2018-02-23 19:34:15 -08:00
2018-02-23 19:36:14 -08:00
```
testnet=1
addnode=testnet1.btcprivate.org:17933
2018-02-23 19:34:15 -08:00
2018-02-23 19:36:14 -08:00
rpcuser=test
rpcpassword=test
rpcport=17932
rpcallowip=127.0.0.1
2018-02-23 19:34:15 -08:00
2018-02-23 19:36:14 -08:00
```
2018-02-23 19:34:15 -08:00
2018-02-23 19:36:14 -08:00
The rpc parameters are required for the daemon to run. the `testnet=1` tells the daemon to connect to testnet, and `addnode=...` is to connect to a reliable node. This is a temporal until we add dns seeds.
2018-02-23 19:34:15 -08:00
2018-02-23 19:36:14 -08:00
3. Execute the btcd binary
2018-02-23 19:34:15 -08:00
2018-02-23 19:36:14 -08:00
Once you run the daemon, you should first wait to sync the chain before mining. Once you are synced you can add `gen=1` to the conf file, and restart the btcp daemon.
2018-02-23 19:34:15 -08:00
2018-02-23 19:36:14 -08:00
Now that you have your node up you can use `btcp-cli` to make RPC calls to your node (i.e `btcp-cli getinfo`).