-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathbitcoin-core-rc-testing.sh
executable file
·67 lines (53 loc) · 1.63 KB
/
bitcoin-core-rc-testing.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#!/bin/bash
BITCOIN_VER="Bitcoin Core 0.21"
BITCOIN_SOURCE="https://bitcoincore.org/bin/bitcoin-core-0.21.0/test.rc2/bitcoin-0.21.0rc2.tar.gz"
BITCOIN_LINUX="https://bitcoincore.org/bin/bitcoin-core-0.21.0/test.rc2/bitcoin-0.21.0rc2-x86_64-linux-gnu.tar.gz"
BITCOIN_MAC="https://bitcoincore.org/bin/bitcoin-core-0.21.0/test.rc2/bitcoin-0.21.0rc2-osx64.tar.gz"
RELEASE_SIG="https://bitcoincore.org/bin/bitcoin-core-0.21.0/test.rc2/SHA256SUMS.asc"
# Default Values
NUM_NODES=3 # Default: Generate three nodes
MINE=0 # Disable mining by default
BLOCK_TIME=4 # Default Block Time
# Important Directories
SCRIPT_DIR=$PWD # Script home directory
UTIL_DIR="$SCRIPT_DIR/util" # Util scripts
TEST_DIR="$SCRIPT_DIR/tests" # Test RPC Commands Scripts
REGTEST_DIR="$SCRIPT_DIR/regtest" # Regtest Directory
DATA_DIR="$REGTEST_DIR/data" # Script data directory
# Source Utilities
for dir in ${UTIL_DIR}/*;
do
for util in ${dir}/*;
do
. $util;
done
done
# Parse option flags and args
while getopts 'h' option; do
case "$option" in
# Show Help screen
h) help;;
# Unkown Command: Show help
*) help;;
esac
done
# run cleanup on ctrl+c signal
trap ctrl+c SIGINT
# Get system info
get_sys_info
# Configure script options
configure
# Download Bitcoin
download_btc
# check for valid signature before unpacking Release
check_rel_sig
# unarchive Bitcoin
unpack_btc
# source tests
cd $SCRIPT_DIR
run_tests
# Send data if enabled
#if $COLLECT_DATA; then
#send_data
#fi
cleanup