diff options
Diffstat (limited to 'qa')
-rwxr-xr-x | qa/pull-tester/rpc-tests.sh | 2 | ||||
-rw-r--r-- | qa/rpc-tests/util.py | 18 |
2 files changed, 10 insertions, 10 deletions
diff --git a/qa/pull-tester/rpc-tests.sh b/qa/pull-tester/rpc-tests.sh index f07e3c6d9d..a0056c141b 100755 --- a/qa/pull-tester/rpc-tests.sh +++ b/qa/pull-tester/rpc-tests.sh @@ -13,7 +13,7 @@ export BITCOIND=${REAL_BITCOIND} if [ "x${ENABLE_BITCOIND}${ENABLE_UTILS}${ENABLE_WALLET}" = "x111" ]; then ${BUILDDIR}/qa/rpc-tests/wallet.sh "${BUILDDIR}/src" ${BUILDDIR}/qa/rpc-tests/listtransactions.py --srcdir "${BUILDDIR}/src" - ${BUILDDIR}/qa/rpc-tests/forknotify.py --srcdir "${BUILDDIR}/src" + #${BUILDDIR}/qa/rpc-tests/forknotify.py --srcdir "${BUILDDIR}/src" else echo "No rpc tests to run. Wallet, utils, and bitcoind must all be enabled" fi diff --git a/qa/rpc-tests/util.py b/qa/rpc-tests/util.py index c895eb1619..0d5eeefa79 100644 --- a/qa/rpc-tests/util.py +++ b/qa/rpc-tests/util.py @@ -61,8 +61,8 @@ def sync_mempools(rpc_connections): bitcoind_processes = {} -def initialize_datadir(dir, n): - datadir = os.path.join(dir, "node"+str(n)) +def initialize_datadir(dirname, n): + datadir = os.path.join(dirname, "node"+str(n)) if not os.path.isdir(datadir): os.makedirs(datadir) with open(os.path.join(datadir, "bitcoin.conf"), 'w') as f: @@ -145,11 +145,11 @@ def _rpchost_to_args(rpchost): rv += ['-rpcport=' + rpcport] return rv -def start_node(i, dir, extra_args=None, rpchost=None): +def start_node(i, dirname, extra_args=None, rpchost=None): """ Start a bitcoind and return RPC connection to it """ - datadir = os.path.join(dir, "node"+str(i)) + datadir = os.path.join(dirname, "node"+str(i)) args = [ os.getenv("BITCOIND", "bitcoind"), "-datadir="+datadir, "-keypool=1", "-discover=0" ] if extra_args is not None: args.extend(extra_args) bitcoind_processes[i] = subprocess.Popen(args) @@ -163,15 +163,15 @@ def start_node(i, dir, extra_args=None, rpchost=None): proxy.url = url # store URL on proxy for info return proxy -def start_nodes(num_nodes, dir, extra_args=None, rpchost=None): +def start_nodes(num_nodes, dirname, extra_args=None, rpchost=None): """ Start multiple bitcoinds, return RPC connections to them """ if extra_args is None: extra_args = [ None for i in range(num_nodes) ] - return [ start_node(i, dir, extra_args[i], rpchost) for i in range(num_nodes) ] + return [ start_node(i, dirname, extra_args[i], rpchost) for i in range(num_nodes) ] -def log_filename(dir, n_node, logname): - return os.path.join(dir, "node"+str(n_node), "regtest", logname) +def log_filename(dirname, n_node, logname): + return os.path.join(dirname, "node"+str(n_node), "regtest", logname) def stop_node(node, i): node.stop() @@ -225,7 +225,7 @@ def gather_inputs(from_node, amount_needed): total_in += t["amount"] inputs.append({ "txid" : t["txid"], "vout" : t["vout"], "address" : t["address"] } ) if total_in < amount_needed: - raise RuntimeError("Insufficient funds: need %d, have %d"%(amount+fee*2, total_in)) + raise RuntimeError("Insufficient funds: need %d, have %d"%(amount_needed, total_in)) return (total_in, inputs) def make_change(from_node, amount_in, amount_out, fee): |