mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-03 17:30:25 +01:00
[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.
This commit is contained in:
@@ -30,8 +30,7 @@ class WalletEncryptionTest(BitcoinTestFramework):
|
||||
assert_equal(len(privkey), 52)
|
||||
|
||||
# Encrypt the wallet
|
||||
self.nodes[0].encryptwallet(passphrase)
|
||||
self.bitcoind_processes[0].wait(timeout=BITCOIND_PROC_WAIT_TIMEOUT)
|
||||
self.nodes[0].node_encrypt_wallet(passphrase)
|
||||
self.nodes[0] = self.start_node(0, self.options.tmpdir)
|
||||
|
||||
# Test that the wallet is encrypted
|
||||
|
||||
Reference in New Issue
Block a user