Browse Source

Fix docstrings in qa tests

This commit fixes the module-level docstrings for the tests and helper
modules in qa. Many of these tests were uncommented previously - this
commit ensures that every test case has at least a minimum level of
commenting.
pull/1/head
John Newbery 6 years ago
parent
commit
3f95a806b1
  1. 9
      qa/rpc-tests/abandonconflict.py
  2. 5
      qa/rpc-tests/assumevalid.py
  3. 26
      qa/rpc-tests/bip65-cltv-p2p.py
  4. 5
      qa/rpc-tests/bip65-cltv.py
  5. 23
      qa/rpc-tests/bip68-112-113-p2p.py
  6. 5
      qa/rpc-tests/bip68-sequence.py
  7. 38
      qa/rpc-tests/bip9-softforks.py
  8. 31
      qa/rpc-tests/bipdersig-p2p.py
  9. 5
      qa/rpc-tests/bipdersig.py
  10. 18
      qa/rpc-tests/blockchain.py
  11. 1
      qa/rpc-tests/bumpfee.py
  12. 9
      qa/rpc-tests/create_cache.py
  13. 4
      qa/rpc-tests/decodescript.py
  14. 8
      qa/rpc-tests/disablewallet.py
  15. 5
      qa/rpc-tests/forknotify.py
  16. 1
      qa/rpc-tests/fundrawtransaction.py
  17. 5
      qa/rpc-tests/getblocktemplate_longpoll.py
  18. 4
      qa/rpc-tests/getblocktemplate_proposals.py
  19. 9
      qa/rpc-tests/getchaintips.py
  20. 5
      qa/rpc-tests/httpbasics.py
  21. 4
      qa/rpc-tests/import-rescan.py
  22. 2
      qa/rpc-tests/importmulti.py
  23. 2
      qa/rpc-tests/importprunedfunds.py
  24. 5
      qa/rpc-tests/invalidateblock.py
  25. 17
      qa/rpc-tests/invalidblockrequest.py
  26. 7
      qa/rpc-tests/invalidtxrequest.py
  27. 3
      qa/rpc-tests/keypool.py
  28. 1
      qa/rpc-tests/listsinceblock.py
  29. 3
      qa/rpc-tests/listtransactions.py
  30. 13
      qa/rpc-tests/maxblocksinflight.py
  31. 16
      qa/rpc-tests/maxuploadtarget.py
  32. 3
      qa/rpc-tests/mempool_limit.py
  33. 3
      qa/rpc-tests/mempool_packages.py
  34. 8
      qa/rpc-tests/mempool_reorg.py
  35. 6
      qa/rpc-tests/mempool_resurrect_test.py
  36. 19
      qa/rpc-tests/mempool_spendcoinbase.py
  37. 5
      qa/rpc-tests/merkle_blocks.py
  38. 5
      qa/rpc-tests/multi_rpc.py
  39. 5
      qa/rpc-tests/nodehandling.py
  40. 21
      qa/rpc-tests/nulldummy.py
  41. 18
      qa/rpc-tests/p2p-acceptblock.py
  42. 12
      qa/rpc-tests/p2p-compactblocks.py
  43. 5
      qa/rpc-tests/p2p-feefilter.py
  44. 16
      qa/rpc-tests/p2p-fullblocktest.py
  45. 14
      qa/rpc-tests/p2p-leaktests.py
  46. 5
      qa/rpc-tests/p2p-mempool.py
  47. 4
      qa/rpc-tests/p2p-segwit.py
  48. 2
      qa/rpc-tests/p2p-timeouts.py
  49. 12
      qa/rpc-tests/p2p-versionbits-warning.py
  50. 5
      qa/rpc-tests/preciousblock.py
  51. 5
      qa/rpc-tests/prioritise_transaction.py
  52. 29
      qa/rpc-tests/proxy_test.py
  53. 12
      qa/rpc-tests/pruning.py
  54. 16
      qa/rpc-tests/rawtransactions.py
  55. 4
      qa/rpc-tests/receivedby.py
  56. 9
      qa/rpc-tests/reindex.py
  57. 7
      qa/rpc-tests/replace-by-fee.py
  58. 6
      qa/rpc-tests/rest.py
  59. 3
      qa/rpc-tests/rpcbind_test.py
  60. 1
      qa/rpc-tests/rpcnamedargs.py
  61. 5
      qa/rpc-tests/segwit.py
  62. 17
      qa/rpc-tests/sendheaders.py
  63. 3
      qa/rpc-tests/signmessages.py
  64. 7
      qa/rpc-tests/signrawtransactions.py
  65. 21
      qa/rpc-tests/smartfees.py
  66. 7
      qa/rpc-tests/test_framework/address.py
  67. 67
      qa/rpc-tests/test_framework/authproxy.py
  68. 10
      qa/rpc-tests/test_framework/bignum.py
  69. 12
      qa/rpc-tests/test_framework/blockstore.py
  70. 2
      qa/rpc-tests/test_framework/blocktools.py
  71. 33
      qa/rpc-tests/test_framework/comptool.py
  72. 9
      qa/rpc-tests/test_framework/coverage.py
  73. 10
      qa/rpc-tests/test_framework/key.py
  74. 32
      qa/rpc-tests/test_framework/mininode.py
  75. 5
      qa/rpc-tests/test_framework/netutil.py
  76. 12
      qa/rpc-tests/test_framework/script.py
  77. 7
      qa/rpc-tests/test_framework/siphash.py
  78. 14
      qa/rpc-tests/test_framework/socks5.py
  79. 3
      qa/rpc-tests/test_framework/test_framework.py
  80. 6
      qa/rpc-tests/test_framework/util.py
  81. 5
      qa/rpc-tests/txn_clone.py
  82. 5
      qa/rpc-tests/txn_doublespend.py
  83. 10
      qa/rpc-tests/wallet-accounts.py
  84. 1
      qa/rpc-tests/wallet-dump.py
  85. 1
      qa/rpc-tests/wallet-hd.py
  86. 2
      qa/rpc-tests/wallet.py
  87. 4
      qa/rpc-tests/walletbackup.py
  88. 9
      qa/rpc-tests/zapwallettxes.py
  89. 5
      qa/rpc-tests/zmq_test.py

9
qa/rpc-tests/abandonconflict.py

@ -2,7 +2,14 @@ @@ -2,7 +2,14 @@
# Copyright (c) 2014-2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test the abandontransaction RPC.
The abandontransaction RPC marks a transaction and all its in-wallet
descendants as abandoned which allows their inputs to be respent. It can be
used to replace "stuck" or evicted transactions. It only works on transactions
which are not included in a block and are not currently in the mempool. It has
no effect on transactions which are already conflicted or abandoned.
"""
from test_framework.test_framework import BitcoinTestFramework
from test_framework.util import *

5
qa/rpc-tests/assumevalid.py

@ -2,8 +2,7 @@ @@ -2,8 +2,7 @@
# Copyright (c) 2014-2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
'''
assumevalid.py
"""Test logic for skipping signature validation on old blocks.
Test logic for skipping signature validation on blocks which we've assumed
valid (https://github.com/bitcoin/bitcoin/pull/9484)
@ -29,7 +28,7 @@ Start three nodes: @@ -29,7 +28,7 @@ Start three nodes:
- node2 has -assumevalid set to the hash of block 102. Try to sync to
block 200. node2 will reject block 102 since it's assumed valid, but it
isn't buried by at least two weeks' work.
'''
"""
from test_framework.mininode import *
from test_framework.test_framework import BitcoinTestFramework

26
qa/rpc-tests/bip65-cltv-p2p.py

@ -2,6 +2,19 @@ @@ -2,6 +2,19 @@
# Copyright (c) 2015-2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test BIP65 (CHECKLOCKTIMEVERIFY).
Connect to a single node.
Mine 2 (version 3) blocks (save the coinbases for later).
Generate 98 more version 3 blocks, verify the node accepts.
Mine 749 version 4 blocks, verify the node accepts.
Check that the new CLTV rules are not enforced on the 750th version 4 block.
Check that the new CLTV rules are enforced on the 751st version 4 block.
Mine 199 new version blocks.
Mine 1 old-version block.
Mine 1 new version block.
Mine 1 old version block, see that the node rejects.
"""
from test_framework.test_framework import ComparisonTestFramework
from test_framework.util import *
@ -20,19 +33,6 @@ def cltv_invalidate(tx): @@ -20,19 +33,6 @@ def cltv_invalidate(tx):
tx.vin[0].scriptSig = CScript([OP_1NEGATE, OP_CHECKLOCKTIMEVERIFY, OP_DROP] +
list(CScript(tx.vin[0].scriptSig)))
'''
This test is meant to exercise BIP65 (CHECKLOCKTIMEVERIFY)
Connect to a single node.
Mine 2 (version 3) blocks (save the coinbases for later).
Generate 98 more version 3 blocks, verify the node accepts.
Mine 749 version 4 blocks, verify the node accepts.
Check that the new CLTV rules are not enforced on the 750th version 4 block.
Check that the new CLTV rules are enforced on the 751st version 4 block.
Mine 199 new version blocks.
Mine 1 old-version block.
Mine 1 new version block.
Mine 1 old version block, see that the node rejects.
'''
class BIP65Test(ComparisonTestFramework):

5
qa/rpc-tests/bip65-cltv.py

@ -2,10 +2,7 @@ @@ -2,10 +2,7 @@
# Copyright (c) 2015-2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
# Test the CHECKLOCKTIMEVERIFY (BIP65) soft-fork logic
#
"""Test the CHECKLOCKTIMEVERIFY (BIP65) soft-fork logic."""
from test_framework.test_framework import BitcoinTestFramework
from test_framework.util import *

23
qa/rpc-tests/bip68-112-113-p2p.py

@ -2,18 +2,8 @@ @@ -2,18 +2,8 @@
# Copyright (c) 2015-2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test activation of the first version bits soft fork.
from test_framework.test_framework import ComparisonTestFramework
from test_framework.util import *
from test_framework.mininode import ToHex, NetworkThread
from test_framework.blocktools import create_coinbase, create_block
from test_framework.comptool import TestInstance, TestManager
from test_framework.script import *
from io import BytesIO
import time
'''
This test is meant to exercise activation of the first version bits soft fork
This soft fork will activate the following BIPS:
BIP 68 - nSequence relative lock times
BIP 112 - CHECKSEQUENCEVERIFY
@ -51,7 +41,16 @@ bip112txs_vary_nSequence_9 - 16 txs with nSequence relative_locktimes of 9 evalu @@ -51,7 +41,16 @@ bip112txs_vary_nSequence_9 - 16 txs with nSequence relative_locktimes of 9 evalu
bip112txs_vary_OP_CSV - 16 txs with nSequence = 10 evaluated against varying {relative_locktimes of 10} OP_CSV OP_DROP
bip112txs_vary_OP_CSV_9 - 16 txs with nSequence = 9 evaluated against varying {relative_locktimes of 10} OP_CSV OP_DROP
bip112tx_special - test negative argument to OP_CSV
'''
"""
from test_framework.test_framework import ComparisonTestFramework
from test_framework.util import *
from test_framework.mininode import ToHex, CTransaction, NetworkThread
from test_framework.blocktools import create_coinbase, create_block
from test_framework.comptool import TestInstance, TestManager
from test_framework.script import *
from io import BytesIO
import time
base_relative_locktime = 10
seq_disable_flag = 1<<31

5
qa/rpc-tests/bip68-sequence.py

@ -2,10 +2,7 @@ @@ -2,10 +2,7 @@
# Copyright (c) 2014-2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
# Test BIP68 implementation
#
"""Test BIP68 implementation."""
from test_framework.test_framework import BitcoinTestFramework
from test_framework.util import *

38
qa/rpc-tests/bip9-softforks.py

@ -2,20 +2,8 @@ @@ -2,20 +2,8 @@
# Copyright (c) 2015-2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test BIP 9 soft forks.
from test_framework.blockstore import BlockStore
from test_framework.test_framework import ComparisonTestFramework
from test_framework.util import *
from test_framework.mininode import CTransaction, NetworkThread
from test_framework.blocktools import create_coinbase, create_block
from test_framework.comptool import TestInstance, TestManager
from test_framework.script import CScript, OP_1NEGATE, OP_CHECKSEQUENCEVERIFY, OP_DROP
from io import BytesIO
import time
import itertools
'''
This test is meant to exercise BIP forks
Connect to a single node.
regtest lock-in with 108/144 block signalling
activation after a further 144 blocks
@ -26,8 +14,18 @@ mine 108 blocks signalling readiness and 36 blocks not signalling readiness (STA @@ -26,8 +14,18 @@ mine 108 blocks signalling readiness and 36 blocks not signalling readiness (STA
mine a further 143 blocks (LOCKED_IN)
test that enforcement has not triggered (which triggers ACTIVE)
test that enforcement has triggered
'''
"""
from test_framework.blockstore import BlockStore
from test_framework.test_framework import ComparisonTestFramework
from test_framework.util import *
from test_framework.mininode import CTransaction, NetworkThread
from test_framework.blocktools import create_coinbase, create_block
from test_framework.comptool import TestInstance, TestManager
from test_framework.script import CScript, OP_1NEGATE, OP_CHECKSEQUENCEVERIFY, OP_DROP
from io import BytesIO
import time
import itertools
class BIP9SoftForksTest(ComparisonTestFramework):
@ -225,21 +223,21 @@ class BIP9SoftForksTest(ComparisonTestFramework): @@ -225,21 +223,21 @@ class BIP9SoftForksTest(ComparisonTestFramework):
return
def csv_invalidate(self, tx):
'''Modify the signature in vin 0 of the tx to fail CSV
"""Modify the signature in vin 0 of the tx to fail CSV
Prepends -1 CSV DROP in the scriptSig itself.
'''
"""
tx.vin[0].scriptSig = CScript([OP_1NEGATE, OP_CHECKSEQUENCEVERIFY, OP_DROP] +
list(CScript(tx.vin[0].scriptSig)))
def sequence_lock_invalidate(self, tx):
'''Modify the nSequence to make it fails once sequence lock rule is activated (high timespan)
'''
"""Modify the nSequence to make it fails once sequence lock rule is
activated (high timespan).
"""
tx.vin[0].nSequence = 0x00FFFFFF
tx.nLockTime = 0
def mtp_invalidate(self, tx):
'''Modify the nLockTime to make it fails once MTP rule is activated
'''
"""Modify the nLockTime to make it fails once MTP rule is activated."""
# Disable Sequence lock, Activate nLockTime
tx.vin[0].nSequence = 0x90FFFFFF
tx.nLockTime = self.last_block_time

31
qa/rpc-tests/bipdersig-p2p.py

@ -2,6 +2,19 @@ @@ -2,6 +2,19 @@
# Copyright (c) 2015-2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test BIP66 (DER SIG).
Connect to a single node.
Mine 2 (version 2) blocks (save the coinbases for later).
Generate 98 more version 2 blocks, verify the node accepts.
Mine 749 version 3 blocks, verify the node accepts.
Check that the new DERSIG rules are not enforced on the 750th version 3 block.
Check that the new DERSIG rules are enforced on the 751st version 3 block.
Mine 199 new version blocks.
Mine 1 old-version block.
Mine 1 new version block.
Mine 1 old version block, see that the node rejects.
"""
from test_framework.test_framework import ComparisonTestFramework
from test_framework.util import *
@ -15,10 +28,10 @@ import time @@ -15,10 +28,10 @@ import time
# A canonical signature consists of:
# <30> <total len> <02> <len R> <R> <02> <len S> <S> <hashtype>
def unDERify(tx):
'''
"""
Make the signature in vin 0 of a tx non-DER-compliant,
by adding padding after the S-value.
'''
"""
scriptSig = CScript(tx.vin[0].scriptSig)
newscript = []
for i in scriptSig:
@ -27,20 +40,6 @@ def unDERify(tx): @@ -27,20 +40,6 @@ def unDERify(tx):
else:
newscript.append(i)
tx.vin[0].scriptSig = CScript(newscript)
'''
This test is meant to exercise BIP66 (DER SIG).
Connect to a single node.
Mine 2 (version 2) blocks (save the coinbases for later).
Generate 98 more version 2 blocks, verify the node accepts.
Mine 749 version 3 blocks, verify the node accepts.
Check that the new DERSIG rules are not enforced on the 750th version 3 block.
Check that the new DERSIG rules are enforced on the 751st version 3 block.
Mine 199 new version blocks.
Mine 1 old-version block.
Mine 1 new version block.
Mine 1 old version block, see that the node rejects.
'''
class BIP66Test(ComparisonTestFramework):

5
qa/rpc-tests/bipdersig.py

@ -2,10 +2,7 @@ @@ -2,10 +2,7 @@
# Copyright (c) 2014-2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
# Test the BIP66 changeover logic
#
"""Test the BIP66 changeover logic."""
from test_framework.test_framework import BitcoinTestFramework
from test_framework.util import *

18
qa/rpc-tests/blockchain.py

@ -2,11 +2,14 @@ @@ -2,11 +2,14 @@
# Copyright (c) 2014-2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test RPCs related to blockchainstate.
#
# Test RPC calls related to blockchain state. Tests correspond to code in
# rpc/blockchain.cpp.
#
Test the following RPCs:
- gettxoutsetinfo
- verifychain
Tests correspond to code in rpc/blockchain.cpp.
"""
from decimal import Decimal
@ -23,13 +26,6 @@ from test_framework.util import ( @@ -23,13 +26,6 @@ from test_framework.util import (
class BlockchainTest(BitcoinTestFramework):
"""
Test blockchain-related RPC calls:
- gettxoutsetinfo
- verifychain
"""
def __init__(self):
super().__init__()

1
qa/rpc-tests/bumpfee.py

@ -2,6 +2,7 @@ @@ -2,6 +2,7 @@
# Copyright (c) 2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test the bumpfee RPC."""
from segwit import send_to_witness
from test_framework.test_framework import BitcoinTestFramework

9
qa/rpc-tests/create_cache.py

@ -2,11 +2,12 @@ @@ -2,11 +2,12 @@
# Copyright (c) 2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Create a blockchain cache.
#
# Helper script to create the cache
# (see BitcoinTestFramework.setup_chain)
#
Creating a cache of the blockchain speeds up test execution when running
multiple qa tests. This helper script is executed by rpc-tests when multiple
tests are being run in parallel.
"""
from test_framework.test_framework import BitcoinTestFramework

4
qa/rpc-tests/decodescript.py

@ -2,6 +2,7 @@ @@ -2,6 +2,7 @@
# Copyright (c) 2015-2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test decoding scripts via decodescript RPC command."""
from test_framework.test_framework import BitcoinTestFramework
from test_framework.util import *
@ -9,7 +10,6 @@ from test_framework.mininode import * @@ -9,7 +10,6 @@ from test_framework.mininode import *
from io import BytesIO
class DecodeScriptTest(BitcoinTestFramework):
"""Tests decoding scripts via RPC command "decodescript"."""
def __init__(self):
super().__init__()
@ -111,7 +111,7 @@ class DecodeScriptTest(BitcoinTestFramework): @@ -111,7 +111,7 @@ class DecodeScriptTest(BitcoinTestFramework):
assert_equal('OP_IF ' + public_key + ' OP_CHECKSIGVERIFY OP_ELSE 500000 OP_CHECKLOCKTIMEVERIFY OP_DROP OP_ENDIF ' + public_key + ' OP_CHECKSIG', rpc_result['asm'])
def decoderawtransaction_asm_sighashtype(self):
"""Tests decoding scripts via RPC command "decoderawtransaction".
"""Test decoding scripts via RPC command "decoderawtransaction".
This test is in with the "decodescript" tests because they are testing the same "asm" script decodes.
"""

8
qa/rpc-tests/disablewallet.py

@ -2,10 +2,11 @@ @@ -2,10 +2,11 @@
# Copyright (c) 2015-2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test a node with the -disablewallet option.
#
# Exercise API with -disablewallet.
#
- Test that validateaddress RPC works when running with -disablewallet
- Test that it is not possible to mine to an invalid address.
"""
from test_framework.test_framework import BitcoinTestFramework
from test_framework.util import *
@ -24,7 +25,6 @@ class DisableWalletTest (BitcoinTestFramework): @@ -24,7 +25,6 @@ class DisableWalletTest (BitcoinTestFramework):
self.sync_all()
def run_test (self):
# Check regression: https://github.com/bitcoin/bitcoin/issues/6963#issuecomment-154548880
x = self.nodes[0].validateaddress('3J98t1WpEZ73CNmQviecrnyiWrnqRhWNLy')
assert(x['isvalid'] == False)
x = self.nodes[0].validateaddress('mneYUmWYsuk7kySiURxCi3AGxrAqZxLgPZ')

5
qa/rpc-tests/forknotify.py

@ -2,10 +2,7 @@ @@ -2,10 +2,7 @@
# Copyright (c) 2014-2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
# Test -alertnotify
#
"""Test the -alertnotify option."""
from test_framework.test_framework import BitcoinTestFramework
from test_framework.util import *

1
qa/rpc-tests/fundrawtransaction.py

@ -2,6 +2,7 @@ @@ -2,6 +2,7 @@
# Copyright (c) 2014-2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test the fundrawtransaction RPC."""
from test_framework.test_framework import BitcoinTestFramework
from test_framework.util import *

5
qa/rpc-tests/getblocktemplate_longpoll.py

@ -2,6 +2,7 @@ @@ -2,6 +2,7 @@
# Copyright (c) 2014-2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test longpolling with getblocktemplate."""
from test_framework.test_framework import BitcoinTestFramework
from test_framework.util import *
@ -22,10 +23,6 @@ class LongpollThread(threading.Thread): @@ -22,10 +23,6 @@ class LongpollThread(threading.Thread):
self.node.getblocktemplate({'longpollid':self.longpollid})
class GetBlockTemplateLPTest(BitcoinTestFramework):
'''
Test longpolling with getblocktemplate.
'''
def __init__(self):
super().__init__()
self.num_nodes = 4

4
qa/rpc-tests/getblocktemplate_proposals.py

@ -2,6 +2,7 @@ @@ -2,6 +2,7 @@
# Copyright (c) 2014-2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test block proposals with getblocktemplate."""
from test_framework.test_framework import BitcoinTestFramework
from test_framework.util import *
@ -66,9 +67,6 @@ def assert_template(node, tmpl, txlist, expect): @@ -66,9 +67,6 @@ def assert_template(node, tmpl, txlist, expect):
raise AssertionError('unexpected: %s' % (rsp,))
class GetBlockTemplateProposalTest(BitcoinTestFramework):
'''
Test block proposals with getblocktemplate.
'''
def __init__(self):
super().__init__()

9
qa/rpc-tests/getchaintips.py

@ -2,10 +2,13 @@ @@ -2,10 +2,13 @@
# Copyright (c) 2014-2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test the getchaintips RPC.
# Exercise the getchaintips API. We introduce a network split, work
# on chains of different lengths, and join the network together again.
# This gives us two tips, verify that it works.
- introduce a network split
- work on chains of different lengths
- join the network together again
- verify that getchaintips now returns two chain tips.
"""
from test_framework.test_framework import BitcoinTestFramework
from test_framework.util import assert_equal

5
qa/rpc-tests/httpbasics.py

@ -2,10 +2,7 @@ @@ -2,10 +2,7 @@
# Copyright (c) 2014-2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
# Test rpc http basics
#
"""Test the RPC HTTP basics."""
from test_framework.test_framework import BitcoinTestFramework
from test_framework.util import *

4
qa/rpc-tests/import-rescan.py

@ -2,7 +2,9 @@ @@ -2,7 +2,9 @@
# Copyright (c) 2014-2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test rescan behavior of importaddress, importpubkey, importprivkey, and
"""Test wallet import RPCs.
Test rescan behavior of importaddress, importpubkey, importprivkey, and
importmulti RPCs with different types of keys and rescan options.
In the first part of the test, node 0 creates an address for each type of

2
qa/rpc-tests/importmulti.py

@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
# Copyright (c) 2014-2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test the importmulti RPC."""
from test_framework.test_framework import BitcoinTestFramework
from test_framework.util import *

2
qa/rpc-tests/importprunedfunds.py

@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
# Copyright (c) 2014-2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test the importprunedfunds and removeprunedfunds RPCs."""
from test_framework.test_framework import BitcoinTestFramework
from test_framework.util import *

5
qa/rpc-tests/invalidateblock.py

@ -2,10 +2,7 @@ @@ -2,10 +2,7 @@
# Copyright (c) 2014-2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
# Test InvalidateBlock code
#
"""Test the invalidateblock RPC."""
from test_framework.test_framework import BitcoinTestFramework
from test_framework.util import *

17
qa/rpc-tests/invalidblockrequest.py

@ -2,6 +2,14 @@ @@ -2,6 +2,14 @@
# Copyright (c) 2015-2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test node responses to invalid blocks.
In this test we connect to one node over p2p, and test block requests:
1) Valid blocks should be requested and become chain tip.
2) Invalid block with duplicated transaction should be re-requested.
3) Invalid block with bad coinbase value should be rejected and not
re-requested.
"""
from test_framework.test_framework import ComparisonTestFramework
from test_framework.util import *
@ -10,15 +18,6 @@ from test_framework.blocktools import * @@ -10,15 +18,6 @@ from test_framework.blocktools import *
import copy
import time
'''
In this test we connect to one node over p2p, and test block requests:
1) Valid blocks should be requested and become chain tip.
2) Invalid block with duplicated transaction should be re-requested.
3) Invalid block with bad coinbase value should be rejected and not
re-requested.
'''
# Use the ComparisonTestFramework with 1 node: only use --testbinary.
class InvalidBlockRequestTest(ComparisonTestFramework):

7
qa/rpc-tests/invalidtxrequest.py

@ -2,6 +2,10 @@ @@ -2,6 +2,10 @@
# Copyright (c) 2015-2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test node responses to invalid transactions.
In this test we connect to one node over p2p, and test tx requests.
"""
from test_framework.test_framework import ComparisonTestFramework
from test_framework.comptool import TestManager, TestInstance, RejectResult
@ -9,9 +13,6 @@ from test_framework.blocktools import * @@ -9,9 +13,6 @@ from test_framework.blocktools import *
import time
'''
In this test we connect to one node over p2p, and test tx requests.
'''
# Use the ComparisonTestFramework with 1 node: only use --testbinary.
class InvalidTxRequestTest(ComparisonTestFramework):

3
qa/rpc-tests/keypool.py

@ -2,8 +2,7 @@ @@ -2,8 +2,7 @@
# Copyright (c) 2014-2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
# Exercise the wallet keypool, and interaction with wallet encryption/locking
"""Test the wallet keypool and interaction with wallet encryption/locking."""
from test_framework.test_framework import BitcoinTestFramework
from test_framework.util import *

1
qa/rpc-tests/listsinceblock.py

@ -2,6 +2,7 @@ @@ -2,6 +2,7 @@
# Copyright (c) 2017 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test the listsincelast RPC."""
from test_framework.test_framework import BitcoinTestFramework
from test_framework.util import assert_equal

3
qa/rpc-tests/listtransactions.py

@ -2,8 +2,7 @@ @@ -2,8 +2,7 @@
# Copyright (c) 2014-2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
# Exercise the listtransactions API
"""Test the listtransactions API."""
from test_framework.test_framework import BitcoinTestFramework
from test_framework.util import *

13
qa/rpc-tests/maxblocksinflight.py

@ -2,18 +2,19 @@ @@ -2,18 +2,19 @@
# Copyright (c) 2015-2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test nodes responses to having many blocks in flight.
In this test we connect to one node over p2p, send it numerous inv's, and
compare the resulting number of getdata requests to a max allowed value. We
test for exceeding 128 blocks in flight, which was the limit an 0.9 client will
reach. [0.10 clients shouldn't request more than 16 from a single peer.]
"""
from test_framework.mininode import *
from test_framework.test_framework import BitcoinTestFramework
from test_framework.util import *
import logging
'''
In this test we connect to one node over p2p, send it numerous inv's, and
compare the resulting number of getdata requests to a max allowed value. We
test for exceeding 128 blocks in flight, which was the limit an 0.9 client will
reach. [0.10 clients shouldn't request more than 16 from a single peer.]
'''
MAX_REQUESTS = 128
class TestManager(NodeConnCB):

16
qa/rpc-tests/maxuploadtarget.py

@ -2,21 +2,19 @@ @@ -2,21 +2,19 @@
# Copyright (c) 2015-2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
from test_framework.mininode import *
from test_framework.test_framework import BitcoinTestFramework
from test_framework.util import *
import time
'''
Test behavior of -maxuploadtarget.
"""Test behavior of -maxuploadtarget.
* Verify that getdata requests for old blocks (>1week) are dropped
if uploadtarget has been reached.
* Verify that getdata requests for recent blocks are respecteved even
if uploadtarget has been reached.
* Verify that the upload counters are reset after 24 hours.
'''
"""
from test_framework.mininode import *
from test_framework.test_framework import BitcoinTestFramework
from test_framework.util import *
import time
# TestNode: bare-bones "peer". Used mostly as a conduit for a test to sending
# p2p messages to a node, generating the messages in the main testing logic.

3
qa/rpc-tests/mempool_limit.py

@ -2,8 +2,7 @@ @@ -2,8 +2,7 @@
# Copyright (c) 2014-2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
# Test mempool limiting together/eviction with the wallet
"""Test mempool limiting together/eviction with the wallet."""
from test_framework.test_framework import BitcoinTestFramework
from test_framework.util import *

3
qa/rpc-tests/mempool_packages.py

@ -2,8 +2,7 @@ @@ -2,8 +2,7 @@
# Copyright (c) 2014-2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
# Test descendant package tracking code
"""Test descendant package tracking code."""
from test_framework.test_framework import BitcoinTestFramework
from test_framework.util import *

8
qa/rpc-tests/mempool_reorg.py

@ -2,11 +2,11 @@ @@ -2,11 +2,11 @@
# Copyright (c) 2014-2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test mempool re-org scenarios.
#
# Test re-org scenarios with a mempool that contains transactions
# that spend (directly or indirectly) coinbase transactions.
#
Test re-org scenarios with a mempool that contains transactions
that spend (directly or indirectly) coinbase transactions.
"""
from test_framework.test_framework import BitcoinTestFramework
from test_framework.util import *

6
qa/rpc-tests/mempool_resurrect_test.py

@ -2,11 +2,7 @@ @@ -2,11 +2,7 @@
# Copyright (c) 2014-2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
# Test resurrection of mined transactions when
# the blockchain is re-organized.
#
"""Test resurrection of mined transactions when the blockchain is re-organized."""
from test_framework.test_framework import BitcoinTestFramework
from test_framework.util import *

19
qa/rpc-tests/mempool_spendcoinbase.py

@ -2,16 +2,15 @@ @@ -2,16 +2,15 @@
# Copyright (c) 2014-2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
# Test spending coinbase transactions.
# The coinbase transaction in block N can appear in block
# N+100... so is valid in the mempool when the best block
# height is N+99.
# This test makes sure coinbase spends that will be mature
# in the next block are accepted into the memory pool,
# but less mature coinbase spends are NOT.
#
"""Test spending coinbase transactions.
The coinbase transaction in block N can appear in block
N+100... so is valid in the mempool when the best block
height is N+99.
This test makes sure coinbase spends that will be mature
in the next block are accepted into the memory pool,
but less mature coinbase spends are NOT.
"""
from test_framework.test_framework import BitcoinTestFramework
from test_framework.util import *

5
qa/rpc-tests/merkle_blocks.py

@ -2,10 +2,7 @@ @@ -2,10 +2,7 @@
# Copyright (c) 2014-2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
# Test merkleblock fetch/validation
#
"""Test gettxoutproof and verifytxoutproof RPCs."""
from test_framework.test_framework import BitcoinTestFramework
from test_framework.util import *

5
qa/rpc-tests/multi_rpc.py

@ -2,10 +2,7 @@ @@ -2,10 +2,7 @@
# Copyright (c) 2015-2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
# Test multiple rpc user config option rpcauth
#
"""Test multiple RPC users."""
from test_framework.test_framework import BitcoinTestFramework
from test_framework.util import str_to_b64str, assert_equal

5
qa/rpc-tests/nodehandling.py

@ -2,10 +2,7 @@ @@ -2,10 +2,7 @@
# Copyright (c) 2014-2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
# Test node handling
#
"""Test node handling."""
from test_framework.test_framework import BitcoinTestFramework
from test_framework.util import *

21
qa/rpc-tests/nulldummy.py

@ -2,6 +2,16 @@ @@ -2,6 +2,16 @@
# Copyright (c) 2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test NULLDUMMY softfork.
Connect to a single node.
Generate 2 blocks (save the coinbases for later).
Generate 427 more blocks.
[Policy/Consensus] Check that NULLDUMMY compliant transactions are accepted in the 430th block.
[Policy] Check that non-NULLDUMMY transactions are rejected before activation.
[Consensus] Check that the new NULLDUMMY rules are not enforced on the 431st block.
[Policy/Consensus] Check that the new NULLDUMMY rules are enforced on the 432nd block.
"""
from test_framework.test_framework import BitcoinTestFramework
from test_framework.util import *
@ -25,17 +35,6 @@ def trueDummy(tx): @@ -25,17 +35,6 @@ def trueDummy(tx):
tx.vin[0].scriptSig = CScript(newscript)
tx.rehash()
'''
This test is meant to exercise NULLDUMMY softfork.
Connect to a single node.
Generate 2 blocks (save the coinbases for later).
Generate 427 more blocks.
[Policy/Consensus] Check that NULLDUMMY compliant transactions are accepted in the 430th block.
[Policy] Check that non-NULLDUMMY transactions are rejected before activation.
[Consensus] Check that the new NULLDUMMY rules are not enforced on the 431st block.
[Policy/Consensus] Check that the new NULLDUMMY rules are enforced on the 432nd block.
'''
class NULLDUMMYTest(BitcoinTestFramework):
def __init__(self):

18
qa/rpc-tests/p2p-acceptblock.py

@ -2,15 +2,7 @@ @@ -2,15 +2,7 @@
# Copyright (c) 2015-2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
from test_framework.mininode import *
from test_framework.test_framework import BitcoinTestFramework
from test_framework.util import *
import time
from test_framework.blocktools import create_block, create_coinbase
'''
AcceptBlockTest -- test processing of unrequested blocks.
"""Test processing of unrequested blocks.
Since behavior differs when receiving unrequested blocks from whitelisted peers
versus non-whitelisted peers, this tests the behavior of both (effectively two
@ -54,7 +46,13 @@ The test: @@ -54,7 +46,13 @@ The test:
7. Send Node0 the missing block again.
Node0 should process and the tip should advance.
'''
"""
from test_framework.mininode import *
from test_framework.test_framework import BitcoinTestFramework
from test_framework.util import *
import time
from test_framework.blocktools import create_block, create_coinbase
# TestNode: bare-bones "peer". Used mostly as a conduit for a test to sending
# p2p messages to a node, generating the messages in the main testing logic.

12
qa/rpc-tests/p2p-compactblocks.py

@ -2,6 +2,11 @@ @@ -2,6 +2,11 @@
# Copyright (c) 2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test compact blocks (BIP 152).
Version 1 compact blocks are pre-segwit (txids)
Version 2 compact blocks are post-segwit (wtxids)
"""
from test_framework.mininode import *
from test_framework.test_framework import BitcoinTestFramework
@ -9,13 +14,6 @@ from test_framework.util import * @@ -9,13 +14,6 @@ from test_framework.util import *
from test_framework.blocktools import create_block, create_coinbase, add_witness_commitment
from test_framework.script import CScript, OP_TRUE
'''
CompactBlocksTest -- test compact blocks (BIP 152)
Version 1 compact blocks are pre-segwit (txids)
Version 2 compact blocks are post-segwit (wtxids)
'''
# TestNode: A peer we use to send messages to bitcoind, and store responses.
class TestNode(SingleNodeConnCB):
def __init__(self):

5
qa/rpc-tests/p2p-feefilter.py

@ -2,16 +2,13 @@ @@ -2,16 +2,13 @@
# Copyright (c) 2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
"""Test processing of feefilter messages."""
from test_framework.mininode import *
from test_framework.test_framework import BitcoinTestFramework
from test_framework.util import *
import time
'''
FeeFilterTest -- test processing of feefilter messages
'''
def hashToHex(hash):
return format(hash, '064x')

16
qa/rpc-tests/p2p-fullblocktest.py

@ -2,6 +2,14 @@ @@ -2,6 +2,14 @@
# Copyright (c) 2015-2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test block processing.
This reimplements tests from the bitcoinj/FullBlockTestGenerator used
by the pull-tester.
We use the testing framework in which we expect a particular answer from
each test.
"""
from test_framework.test_framework import ComparisonTestFramework
from test_framework.util import *
@ -17,14 +25,6 @@ class PreviousSpendableOutput(object): @@ -17,14 +25,6 @@ class PreviousSpendableOutput(object):
self.tx = tx
self.n = n # the output we're spending
'''
This reimplements tests from the bitcoinj/FullBlockTestGenerator used
by the pull-tester.
We use the testing framework in which we expect a particular answer from
each test.
'''
# Use this class for tests that require behavior other than normal "mininode" behavior.
# For now, it is used to serialize a bloated varint (b64).
class CBrokenBlock(CBlock):

14
qa/rpc-tests/p2p-leaktests.py

@ -2,20 +2,18 @@ @@ -2,20 +2,18 @@
# Copyright (c) 2017 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
from test_framework.mininode import *
from test_framework.test_framework import BitcoinTestFramework
from test_framework.util import *
'''
Test for message sending before handshake completion
"""Test message sending before handshake completion.
A node should never send anything other than VERSION/VERACK/REJECT until it's
received a VERACK.
This test connects to a node and sends it a few messages, trying to intice it
into sending us something it shouldn't.
'''
"""
from test_framework.mininode import *
from test_framework.test_framework import BitcoinTestFramework
from test_framework.util import *
banscore = 10

5
qa/rpc-tests/p2p-mempool.py

@ -2,6 +2,11 @@ @@ -2,6 +2,11 @@
# Copyright (c) 2015-2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test p2p mempool message.
Test that nodes are disconnected if they send mempool messages when bloom
filters are not enabled.
"""
from test_framework.mininode import *
from test_framework.test_framework import BitcoinTestFramework

4
qa/rpc-tests/p2p-segwit.py

@ -2,6 +2,7 @@ @@ -2,6 +2,7 @@
# Copyright (c) 2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test segwit transactions and blocks on P2P network."""
from test_framework.mininode import *
from test_framework.test_framework import BitcoinTestFramework
@ -21,9 +22,6 @@ VB_TOP_BITS = 0x20000000 @@ -21,9 +22,6 @@ VB_TOP_BITS = 0x20000000
MAX_SIGOP_COST = 80000
'''
SegWit p2p test.
'''
# Calculate the virtual size of a witness block:
# (base + witness/4)

2
qa/rpc-tests/p2p-timeouts.py

@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
# Copyright (c) 2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
""" TimeoutsTest -- test various net timeouts (only in extended tests)
"""Test various net timeouts.
- Create three bitcoind nodes:

12
qa/rpc-tests/p2p-versionbits-warning.py

@ -2,6 +2,11 @@ @@ -2,6 +2,11 @@
# Copyright (c) 2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test version bits warning system.
Generate chains with block versions that appear to be signalling unknown
soft-forks, and test that warning alerts are generated.
"""
from test_framework.mininode import *
from test_framework.test_framework import BitcoinTestFramework
@ -10,13 +15,6 @@ import re @@ -10,13 +15,6 @@ import re
import time
from test_framework.blocktools import create_block, create_coinbase
'''
Test version bits' warning system.
Generate chains with block versions that appear to be signalling unknown
soft-forks, and test that warning alerts are generated.
'''
VB_PERIOD = 144 # versionbits period length for regtest
VB_THRESHOLD = 108 # versionbits activation threshold for regtest
VB_TOP_BITS = 0x20000000

5
qa/rpc-tests/preciousblock.py

@ -2,10 +2,7 @@ @@ -2,10 +2,7 @@
# Copyright (c) 2015-2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
# Test PreciousBlock code
#
"""Test the preciousblock RPC."""
from test_framework.test_framework import BitcoinTestFramework
from test_framework.util import (

5
qa/rpc-tests/prioritise_transaction.py

@ -2,10 +2,7 @@ @@ -2,10 +2,7 @@
# Copyright (c) 2015-2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
# Test PrioritiseTransaction code
#
"""Test the prioritisetransaction mining RPC."""
from test_framework.test_framework import BitcoinTestFramework
from test_framework.util import *

29
qa/rpc-tests/proxy_test.py

@ -2,20 +2,8 @@ @@ -2,20 +2,8 @@
# Copyright (c) 2015-2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test bitcoind with different proxy configuration.
import socket
import os
from test_framework.socks5 import Socks5Configuration, Socks5Command, Socks5Server, AddressType
from test_framework.test_framework import BitcoinTestFramework
from test_framework.util import (
PORT_MIN,
PORT_RANGE,
start_nodes,
assert_equal,
)
from test_framework.netutil import test_ipv6_local
'''
Test plan:
- Start bitcoind's with different proxy configurations
- Use addnode to initiate connections
@ -37,7 +25,20 @@ addnode connect to IPv4 @@ -37,7 +25,20 @@ addnode connect to IPv4
addnode connect to IPv6
addnode connect to onion
addnode connect to generic DNS name
'''
"""
import socket
import os
from test_framework.socks5 import Socks5Configuration, Socks5Command, Socks5Server, AddressType
from test_framework.test_framework import BitcoinTestFramework
from test_framework.util import (
PORT_MIN,
PORT_RANGE,
start_nodes,
assert_equal,
)
from test_framework.netutil import test_ipv6_local
RANGE_BEGIN = PORT_MIN + 2 * PORT_RANGE # Start after p2p and rpc ports

12
qa/rpc-tests/pruning.py

@ -2,14 +2,12 @@ @@ -2,14 +2,12 @@
# Copyright (c) 2014-2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test the pruning code.
#
# Test pruning code
# ********
# WARNING:
# This test uses 4GB of disk space.
# This test takes 30 mins or more (up to 2 hours)
# ********
WARNING:
This test uses 4GB of disk space.
This test takes 30 mins or more (up to 2 hours)
"""
from test_framework.test_framework import BitcoinTestFramework
from test_framework.util import *

16
qa/rpc-tests/rawtransactions.py

@ -2,14 +2,14 @@ @@ -2,14 +2,14 @@
# Copyright (c) 2014-2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""rawtranscation RPCs QA test.
# Tests the following RPCs:
# - createrawtransaction
# - signrawtransaction
# - sendrawtransaction
# - decoderawtransaction
# - getrawtransaction
"""Test the rawtranscation RPCs.
Test the following RPCs:
- createrawtransaction
- signrawtransaction
- sendrawtransaction
- decoderawtransaction
- getrawtransaction
"""
from test_framework.test_framework import BitcoinTestFramework

4
qa/rpc-tests/receivedby.py

@ -2,13 +2,11 @@ @@ -2,13 +2,11 @@
# Copyright (c) 2014-2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.