mirror of
https://github.com/dashpay/dash.git
synced 2024-12-28 05:23:01 +01:00
6c1d1ba6fc
mininode.py provides a framework for connecting to a bitcoin node over the p2p network. NodeConn is the main object that manages connectivity to a node and provides callbacks; the interface for those callbacks is defined by NodeConnCB. Defined also are all data structures from bitcoin core that pass on the network (CBlock, CTransaction, etc), along with de-/serialization functions. maxblocksinflight.py is an example test using this framework that tests whether a node is limiting the maximum number of in-flight block requests. This also adds support to util.py for specifying the binary to use when starting nodes (for tests that compare the behavior of different bitcoind versions), and adds maxblocksinflight.py to the pull tester.
47 lines
1.2 KiB
Bash
Executable File
47 lines
1.2 KiB
Bash
Executable File
#!/bin/bash
|
|
set -e
|
|
|
|
CURDIR=$(cd $(dirname "$0"); pwd)
|
|
# Get BUILDDIR and REAL_BITCOIND
|
|
. "${CURDIR}/tests-config.sh"
|
|
|
|
export BITCOINCLI=${BUILDDIR}/qa/pull-tester/run-bitcoin-cli
|
|
export BITCOIND=${REAL_BITCOIND}
|
|
|
|
if [ "x${EXEEXT}" = "x.exe" ]; then
|
|
echo "Win tests currently disabled"
|
|
exit 0
|
|
fi
|
|
|
|
#Run the tests
|
|
|
|
testScripts=(
|
|
'wallet.py'
|
|
'listtransactions.py'
|
|
'mempool_resurrect_test.py'
|
|
'txn_doublespend.py'
|
|
'txn_doublespend.py --mineblock'
|
|
'getchaintips.py'
|
|
'rest.py'
|
|
'mempool_spendcoinbase.py'
|
|
'mempool_coinbase_spends.py'
|
|
'httpbasics.py'
|
|
'zapwallettxes.py'
|
|
'proxy_test.py'
|
|
'merkle_blocks.py'
|
|
# 'forknotify.py'
|
|
'maxblocksinflight.py'
|
|
);
|
|
if [ "x${ENABLE_BITCOIND}${ENABLE_UTILS}${ENABLE_WALLET}" = "x111" ]; then
|
|
for (( i = 0; i < ${#testScripts[@]}; i++ ))
|
|
do
|
|
if [ -z "$1" ] || [ "$1" == "${testScripts[$i]}" ] || [ "$1.py" == "${testScripts[$i]}" ]
|
|
then
|
|
echo -e "Running testscript \033[1m${testScripts[$i]}...\033[0m"
|
|
${BUILDDIR}/qa/rpc-tests/${testScripts[$i]} --srcdir "${BUILDDIR}/src"
|
|
fi
|
|
done
|
|
else
|
|
echo "No rpc tests to run. Wallet, utils, and bitcoind must all be enabled"
|
|
fi
|