[tests] Introduce TestNode

TestNode is a class responsible for all state related to a bitcoind node
under test. It stores local state, is responsible for tracking the
bitcoind process and delegates unrecognised messages to the RPC
connection.

This commit changes start_nodes and stop_nodes to start and stop the
bitcoind nodes in parallel, making test setup and teardown much faster.

Github-Pull: #10711
Rebased-From: 7897338918
This commit is contained in:
John Newbery
2017-06-02 14:30:36 -04:00
committed by MarcoFalke
parent fb7b529384
commit fc2aa09cf3
12 changed files with 193 additions and 97 deletions

View File

@@ -451,8 +451,7 @@ class RawTransactionsTest(BitcoinTestFramework):
self.stop_node(0)
self.stop_node(2)
self.stop_node(3)
self.nodes[1].encryptwallet("test")
self.bitcoind_processes[1].wait(timeout=BITCOIND_PROC_WAIT_TIMEOUT)
self.nodes[1].node_encrypt_wallet("test")
self.nodes = self.start_nodes(self.num_nodes, self.options.tmpdir)
# This test is not meant to test fee estimation and we'd like