@@ -112,15 +112,9 @@ Generally useful functions.
112112#### [ test_framework/mininode.py] ( test_framework/mininode.py )
113113Basic code to support P2P connectivity to a pivxd.
114114
115- #### [ test_framework/comptool.py] ( test_framework/comptool.py )
116- Framework for comparison-tool style, p2p tests.
117-
118115#### [ test_framework/script.py] ( test_framework/script.py )
119116Utilities for manipulating transaction scripts (originally from python-bitcoinlib)
120117
121- #### [ test_framework/blockstore.py] ( test_framework/blockstore.py )
122- Implements disk-backed block and tx storage.
123-
124118#### [ test_framework/key.py] ( test_framework/key.py )
125119Wrapper around OpenSSL EC_Key (originally from python-bitcoinlib)
126120
@@ -129,49 +123,3 @@ Helpers for script.py
129123
130124#### [ test_framework/blocktools.py] ( test_framework/blocktools.py )
131125Helper functions for creating blocks and transactions.
132-
133- ### Comptool
134-
135- * Testing framework for writing tests that compare the block/tx acceptance
136- behavior of a pivxd against 1 or more other pivxd instances, or against
137- known outcomes, or both.
138-
139- * Set the ``` num_nodes ``` variable (defined in ``` ComparisonTestFramework ``` ) to start up
140- 1 or more nodes. If using 1 node, then ``` --testbinary ``` can be used as a command line
141- option to change the pivxd binary used by the test. If using 2 or more nodes,
142- then ``` --refbinary ``` can be optionally used to change the pivxd that will be used
143- on nodes 2 and up.
144-
145- * Implement a (generator) function called ``` get_tests() ``` which yields ``` TestInstance ``` s.
146- Each ``` TestInstance ``` consists of:
147- - a list of ``` [object, outcome, hash] ``` entries
148- * ``` object ``` is a ``` CBlock ``` , ``` CTransaction ``` , or
149- ``` CBlockHeader ``` . ``` CBlock ``` 's and ``` CTransaction ``` 's are tested for
150- acceptance. ``` CBlockHeader ``` s can be used so that the test runner can deliver
151- complete headers-chains when requested from the pivxd, to allow writing
152- tests where blocks can be delivered out of order but still processed by
153- headers-first pivxd's.
154- * ``` outcome ``` is ``` True ``` , ``` False ``` , or ``` None ``` . If ``` True ```
155- or ``` False ``` , the tip is compared with the expected tip -- either the
156- block passed in, or the hash specified as the optional 3rd entry. If
157- ``` None ``` is specified, then the test will compare all the pivxd's
158- being tested to see if they all agree on what the best tip is.
159- * ``` hash ``` is the block hash of the tip to compare against. Optional to
160- specify; if left out then the hash of the block passed in will be used as
161- the expected tip. This allows for specifying an expected tip while testing
162- the handling of either invalid blocks or blocks delivered out of order,
163- which complete a longer chain.
164- - ``` sync_every_block ``` : ``` True/False ``` . If ``` False ``` , then all blocks
165- are inv'ed together, and the test runner waits until the node receives the
166- last one, and tests only the last block for tip acceptance using the
167- outcome and specified tip. If ``` True ``` , then each block is tested in
168- sequence and synced (this is slower when processing many blocks).
169- - ``` sync_every_transaction ``` : ``` True/False ``` . Analogous to
170- ``` sync_every_block ``` , except if the outcome on the last tx is "None",
171- then the contents of the entire mempool are compared across all pivxd
172- connections. If ``` True ``` or ``` False ``` , then only the last tx's
173- acceptance is tested against the given outcome.
174-
175- * For examples of tests written in this framework, see
176- ``` invalidblockrequest.py ``` and ``` p2p-fullblocktest.py ``` .
177-
0 commit comments