Skip to content

Commit 736c26b

Browse files
committed
Merge #183: Add templates for run_bitcoind.sh config
bf7415f Update the README file with the new templates (Jamil Lambert, PhD) a651062 Add templates (Jamil Lambert, PhD) Pull request description: To help save new users of the crate time add a template for the run-bitcoind config file and one with useful aliases. Update the README to mention them and reorder the directories alphabetically while at it. Closes #173 ACKs for top commit: tcharding: ACK bf7415f Tree-SHA512: 05a330b4b630796905803befe950fe0352409bdde7c007e97fced0a7bf8c628509bef1492cbb2a7bf821cc0bf9c36c823f87d65196b699f0da8cbca0a097655a
2 parents c2f3741 + bf7415f commit 736c26b

File tree

3 files changed

+36
-5
lines changed

3 files changed

+36
-5
lines changed

README.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
There are two primary purposes of this repository:
44

55
1. Provide the [`corepc-types`](https://crates.io/crates/corepc-types) crate for use in production
6-
software.
7-
6+
software.
7+
88
2. Provide tools for integration testing Rust code that interacts with the Bitcoin network.
99
Primarily consumers of the [`rust-bitcoin`](https://crates.io/crates/bitcoin) library. And enable
1010
doing so against multiple versions of Bitcoin Core.
@@ -24,11 +24,13 @@ integration testing.
2424

2525
## Crate/directory listing
2626

27-
- `types/`: [`corepc-types`](https://crates.io/crates/corepc-types): Rust types returned by the JSON-RPC API of Bitcoin Core.
28-
- `node/`: [`corepc-node`](https://crates.io/crates/corepc-node): Runs `bitcoind` regtest nodes.
2927
- `client/`: [`corepc-client`](https://crates.io/crates/corepc-client): A blocking JSON-RPC client used to test `corepc-types`.
28+
- `contrib/`: Contains scripts including one to run local regtest `bitcoind` nodes using versions specified in the config file. A template config file and bitcoind aliases are in the subdirectory `templates/`
3029
- `integration_test/`: Integration tests that use `corepc-client` and `corepc-node` to test `corepc-types`.
31-
- `jsonrpc`: [`jsonrpc`](https://crates.io/crates/jsonrpc): Rudimentary support for sending JSONRPC 2.0 requests and receiving responses.
30+
- `jsonrpc/`: [`jsonrpc`](https://crates.io/crates/jsonrpc): Rudimentary support for sending JSONRPC 2.0 requests and receiving responses.
31+
- `node/`: [`corepc-node`](https://crates.io/crates/corepc-node): Runs `bitcoind` regtest nodes.
32+
- `types/`: [`corepc-types`](https://crates.io/crates/corepc-types): Rust types returned by the JSON-RPC API of Bitcoin Core.
33+
- `verify/`: Provides a tool to help verify the rest of the repository.
3234

3335
## Design
3436

contrib/templates/bitcoind_aliases

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Template for creating aliases for different versions of Bitcoin Core
2+
# The folder names and first 3 digits of the port numbers need to match run-bitcoind.conf
3+
4+
alias bt17='/opt/bitcoin-0.17.2/bin/bitcoin-cli -regtest -rpcuser=user -rpcpassword=password -rpcport=17249'
5+
alias bt18='/opt/bitcoin-0.18.1/bin/bitcoin-cli -regtest -rpcuser=user -rpcpassword=password -rpcport=18149'
6+
alias bt19='/opt/bitcoin-0.19.1/bin/bitcoin-cli -regtest -rpcuser=user -rpcpassword=password -rpcport=19149'
7+
alias bt20='/opt/bitcoin-0.20.2/bin/bitcoin-cli -regtest -rpcuser=user -rpcpassword=password -rpcport=20249'
8+
alias bt21='/opt/bitcoin-0.21.2/bin/bitcoin-cli -regtest -rpcuser=user -rpcpassword=password -rpcport=21249'
9+
alias bt22='/opt/bitcoin-22.1/bin/bitcoin-cli -regtest -rpcuser=user -rpcpassword=password -rpcport=22149'
10+
alias bt23='/opt/bitcoin-23.2/bin/bitcoin-cli -regtest -rpcuser=user -rpcpassword=password -rpcport=23249'
11+
alias bt24='/opt/bitcoin-24.2/bin/bitcoin-cli -regtest -rpcuser=user -rpcpassword=password -rpcport=24249'
12+
alias bt25='/opt/bitcoin-25.2/bin/bitcoin-cli -regtest -rpcuser=user -rpcpassword=password -rpcport=25249'
13+
alias bt26='/opt/bitcoin-26.2/bin/bitcoin-cli -regtest -rpcuser=user -rpcpassword=password -rpcport=26249'
14+
alias bt27='/opt/bitcoin-27.2/bin/bitcoin-cli -regtest -rpcuser=user -rpcpassword=password -rpcport=27249'
15+
alias bt28='/opt/bitcoin-28.1/bin/bitcoin-cli -regtest -rpcuser=user -rpcpassword=password -rpcport=28149'
16+
alias bt29='/opt/bitcoin-29.0/bin/bitcoin-cli -regtest -rpcuser=user -rpcpassword=password -rpcport=29049'

contrib/templates/run-bitcoind.conf

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
v17 0.17.2 172 /opt/bitcoin-0.17.2/bin/bitcoind
2+
v18 0.18.1 181 /opt/bitcoin-0.18.1/bin/bitcoind
3+
v19 0.19.1 191 /opt/bitcoin-0.19.1/bin/bitcoind
4+
v20 0.20.2 202 /opt/bitcoin-0.20.2/bin/bitcoind
5+
v21 0.21.2 212 /opt/bitcoin-0.21.2/bin/bitcoind
6+
v22 22.1 221 /opt/bitcoin-22.1/bin/bitcoind
7+
v23 23.2 232 /opt/bitcoin-23.2/bin/bitcoind
8+
v24 24.2 242 /opt/bitcoin-24.2/bin/bitcoind
9+
v25 25.2 252 /opt/bitcoin-25.2/bin/bitcoind
10+
v26 26.2 262 /opt/bitcoin-26.2/bin/bitcoind
11+
v27 27.2 272 /opt/bitcoin-27.2/bin/bitcoind
12+
v28 28.1 281 /opt/bitcoin-28.1/bin/bitcoind
13+
v29 29.0 290 /opt/bitcoin-29.0/bin/bitcoind

0 commit comments

Comments
 (0)