@@ -89,52 +89,6 @@ thread.)
89
89
- Can be used to write tests where specific P2P protocol behavior is tested.
90
90
Examples tests are ` p2p_unrequested_blocks.py ` , ` p2p_compactblocks.py ` .
91
91
92
- #### Comptool
93
-
94
- - Comptool is a Testing framework for writing tests that compare the block/tx acceptance
95
- behavior of a bitcoind against 1 or more other bitcoind instances. It should not be used
96
- to write static tests with known outcomes, since that type of test is easier to write and
97
- maintain using the standard BitcoinTestFramework.
98
-
99
- - Set the ` num_nodes ` variable (defined in ` ComparisonTestFramework ` ) to start up
100
- 1 or more nodes. If using 1 node, then ` --testbinary ` can be used as a command line
101
- option to change the bitcoind binary used by the test. If using 2 or more nodes,
102
- then ` --refbinary ` can be optionally used to change the bitcoind that will be used
103
- on nodes 2 and up.
104
-
105
- - Implement a (generator) function called ` get_tests() ` which yields ` TestInstance ` s.
106
- Each ` TestInstance ` consists of:
107
- - A list of ` [object, outcome, hash] ` entries
108
- * ` object ` is a ` CBlock ` , ` CTransaction ` , or
109
- ` CBlockHeader ` . ` CBlock ` 's and ` CTransaction ` 's are tested for
110
- acceptance. ` CBlockHeader ` s can be used so that the test runner can deliver
111
- complete headers-chains when requested from the bitcoind, to allow writing
112
- tests where blocks can be delivered out of order but still processed by
113
- headers-first bitcoind's.
114
- * ` outcome ` is ` True ` , ` False ` , or ` None ` . If ` True `
115
- or ` False ` , the tip is compared with the expected tip -- either the
116
- block passed in, or the hash specified as the optional 3rd entry. If
117
- ` None ` is specified, then the test will compare all the bitcoind's
118
- being tested to see if they all agree on what the best tip is.
119
- * ` hash ` is the block hash of the tip to compare against. Optional to
120
- specify; if left out then the hash of the block passed in will be used as
121
- the expected tip. This allows for specifying an expected tip while testing
122
- the handling of either invalid blocks or blocks delivered out of order,
123
- which complete a longer chain.
124
- - ` sync_every_block ` : ` True/False ` . If ` False ` , then all blocks
125
- are inv'ed together, and the test runner waits until the node receives the
126
- last one, and tests only the last block for tip acceptance using the
127
- outcome and specified tip. If ` True ` , then each block is tested in
128
- sequence and synced (this is slower when processing many blocks).
129
- - ` sync_every_transaction ` : ` True/False ` . Analogous to
130
- ` sync_every_block ` , except if the outcome on the last tx is "None",
131
- then the contents of the entire mempool are compared across all bitcoind
132
- connections. If ` True ` or ` False ` , then only the last tx's
133
- acceptance is tested against the given outcome.
134
-
135
- - For examples of tests written in this framework, see
136
- ` p2p_invalid_block.py ` and ` feature_block.py ` .
137
-
138
92
### test-framework modules
139
93
140
94
#### [ test_framework/authproxy.py] ( test_framework/authproxy.py )
@@ -149,15 +103,9 @@ Generally useful functions.
149
103
#### [ test_framework/mininode.py] ( test_framework/mininode.py )
150
104
Basic code to support P2P connectivity to a bitcoind.
151
105
152
- #### [ test_framework/comptool.py] ( test_framework/comptool.py )
153
- Framework for comparison-tool style, P2P tests.
154
-
155
106
#### [ test_framework/script.py] ( test_framework/script.py )
156
107
Utilities for manipulating transaction scripts (originally from python-bitcoinlib)
157
108
158
- #### [ test_framework/blockstore.py] ( test_framework/blockstore.py )
159
- Implements disk-backed block and tx storage.
160
-
161
109
#### [ test_framework/key.py] ( test_framework/key.py )
162
110
Wrapper around OpenSSL EC_Key (originally from python-bitcoinlib)
163
111
0 commit comments