MCPcopy Create free account
hub / github.com/ElementsProject/elements / run_test

Method run_test

test/functional/p2p_segwit.py:248–300  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

246 block.solve()
247
248 def run_test(self):
249 util.node_fastmerkle = self.nodes[0]
250 # Setup the p2p connections
251 # self.test_node sets P2P_SERVICES, i.e. NODE_WITNESS | NODE_NETWORK
252 self.test_node = self.nodes[0].add_p2p_connection(TestP2PConn(), services=P2P_SERVICES)
253 # self.old_node sets only NODE_NETWORK
254 self.old_node = self.nodes[0].add_p2p_connection(TestP2PConn(), services=NODE_NETWORK)
255 # self.std_node is for testing node1 (fRequireStandard=true)
256 self.std_node = self.nodes[1].add_p2p_connection(TestP2PConn(), services=P2P_SERVICES)
257 # self.std_wtx_node is for testing node1 with wtxid relay
258 self.std_wtx_node = self.nodes[1].add_p2p_connection(TestP2PConn(wtxidrelay=True), services=P2P_SERVICES)
259
260 assert self.test_node.nServices & NODE_WITNESS != 0
261
262 # Keep a place to store utxo's that can be used in later tests
263 self.utxo = []
264
265 self.log.info("Starting tests before segwit activation")
266 self.segwit_active = False
267
268 self.test_non_witness_transaction()
269 self.test_v0_outputs_arent_spendable()
270 self.test_block_relay()
271 self.test_unnecessary_witness_before_segwit_activation()
272 self.test_witness_tx_relay_before_segwit_activation()
273 self.test_standardness_v0()
274
275 self.log.info("Advancing to segwit activation")
276 self.advance_to_segwit_active()
277
278 # Segwit status 'active'
279
280 self.test_p2sh_witness()
281 self.test_witness_commitments()
282 self.test_block_malleability()
283 self.test_witness_block_size()
284 self.test_submit_block()
285 self.test_extra_witness_data()
286 self.test_max_witness_push_length()
287 self.test_max_witness_script_length()
288 self.test_witness_input_length()
289 self.test_block_relay()
290 self.test_tx_relay_after_segwit_activation()
291 self.test_standardness_v0()
292 self.test_segwit_versions()
293 self.test_premature_coinbase_witness_spend()
294 self.test_uncompressed_pubkey()
295 self.test_signature_version_1()
296 self.test_non_standard_witness_blinding()
297 self.test_non_standard_witness()
298 self.test_witness_sigops()
299 self.test_superfluous_witness()
300 self.test_wtxid_relay()
301
302 # Individual tests
303

Callers

nothing calls this directly

Tested by

no test coverage detected