Skip to content

Commit 9f478a9

Browse files
committed
Merge #2066: Correct rpc example command syntax
d6ba0ae Correct rpc example command syntax (Adam Gibson) Pull request description: Several of the steps in the README for example_bitcoind_rpc_polling don't work as written. The most important was at the start, there is a missing "init" command that otherwise gives a file error. Also the specification of regtest network needed is a bit different than what is written. Apologies, didn't bother with template, this is just a testing writeup fix (whether correct or not). ACKs for top commit: ValuedMammal: ACK d6ba0ae Tree-SHA512: b287edea7868da12be7ea06fd5352b168f4ab6f389c4b450e77933161b2c89dc4bfad721ca2e68bf21f8f39151bc5f12e716c88dacb287015464b38256fbdc52
2 parents 126ebda + d6ba0ae commit 9f478a9

File tree

1 file changed

+11
-12
lines changed
  • examples/example_bitcoind_rpc_polling

1 file changed

+11
-12
lines changed

examples/example_bitcoind_rpc_polling/README.md

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -34,35 +34,34 @@
3434
7. Set descriptor env and get address from RPC CLI wallet.
3535
```
3636
export DESCRIPTOR="wpkh(tprv8ZgxMBicQKsPfK9BTf82oQkHhawtZv19CorqQKPFeaHDMA4dXYX6eWsJGNJ7VTQXWmoHdrfjCYuDijcRmNFwSKcVhswzqs4fugE8turndGc/1/*)"
37-
cargo run -- --network regtest address next
37+
cargo run -- init --network regtest
38+
cargo run -- address next
3839
```
39-
8. Send 5 test bitcoin to RPC CLI wallet.
40+
8. Send 0.05 test bitcoin to RPC CLI wallet.
4041
```
41-
bitcoin-cli -rpcwallet="test" -datadir=/tmp/regtest/bitcoind -regtest -rpcuser=<your-rpc-username> -rpcpassword=<your-rpc-password> sendtoaddress <address> 5
42+
bitcoin-cli -rpcwallet="test" -datadir=/tmp/regtest/bitcoind -regtest -rpcuser=<your-rpc-username> -rpcpassword=<your-rpc-password> sendtoaddress <address> 0.05
4243
```
4344
9. Sync blockchain with RPC CLI wallet.
4445
```
45-
cargo run -- --network regtest sync
46-
<CNTRL-C to stop syncing>
46+
cargo run -- sync
4747
```
4848
10. Get RPC CLI wallet unconfirmed balances.
4949
```
50-
cargo run -- --network regtest balance
50+
cargo run -- balance
5151
```
5252
11. Generate 1 block with reward to test bitcoind wallet address.
5353
```
54-
bitcoin-cli -datadir=/tmp/regtest/bitcoind -rpcuser=<your-rpc-username> -rpcpassword=<your-rpc-password> -regtest generatetoaddress 10 $BITCOIND_ADDRESS
54+
bitcoin-cli -datadir=/tmp/regtest/bitcoind -rpcuser=<your-rpc-username> -rpcpassword=<your-rpc-password> -regtest generatetoaddress 1 $BITCOIND_ADDRESS
5555
```
5656
12. Sync the blockchain with RPC CLI wallet.
5757
```
58-
cargo run -- --network regtest sync
59-
<CNTRL-C to stop syncing>
58+
cargo run -- sync
6059
```
6160
13. Get RPC CLI wallet confirmed balances.
6261
```
63-
cargo run -- --network regtest balance
62+
cargo run -- balance
6463
```
6564
14. Get RPC CLI wallet transactions.
6665
```
67-
cargo run -- --network regtest txout list
68-
```
66+
cargo run -- txout list
67+
```

0 commit comments

Comments
 (0)