aboutsummaryrefslogtreecommitdiff
path: root/test/functional/test_framework/test_node.py
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2019-05-24 07:00:54 -0400
committerMarcoFalke <falke.marco@gmail.com>2019-05-24 07:01:03 -0400
commit63b9efa73d6bec280241fe0fa06abf7e5b4dde8d (patch)
tree5f63621c606bf6c905cc73c601715856379cfa7b /test/functional/test_framework/test_node.py
parent854ffcae807ddc9b15710eb478bed989a37e1756 (diff)
parentfa473303972b7dad600d949dc9b303d8136cb7e7 (diff)
downloadbitcoin-63b9efa73d6bec280241fe0fa06abf7e5b4dde8d.tar.xz
Merge #16042: test: Bump MAX_NODES to 12
fa47330397 test: Speed up cache creation (MarcoFalke) fa6ad7a5ec test: Bump MAX_NODES to 12 (MarcoFalke) Pull request description: When testing a combination of settings that affect the datadir (e.g. prune, blockfilter, ...) we may need a lot of datadirs. Bump the maximum number of nodes proactively from 8 to 12, so that caches get populated with 12 node dirs, as opposed to 8. Also, add an assert that the list of deterministic keys is exactly the number of max nodes (and not more than that. Also, create the cache faster. ACKs for commit fa4733: laanwj: utACK fa473303972b7dad600d949dc9b303d8136cb7e7 Tree-SHA512: 9803c765ed52d344102f5a3bce57b05d88a7429dcb05ed66ed6c881fda8d87c2834d02d21b95fe9f39c0efe3b8527e13cf94f006588cde22e8c2cd50b2d517a6
Diffstat (limited to 'test/functional/test_framework/test_node.py')
-rwxr-xr-xtest/functional/test_framework/test_node.py18
1 files changed, 12 insertions, 6 deletions
diff --git a/test/functional/test_framework/test_node.py b/test/functional/test_framework/test_node.py
index b9d1082ddc..3311377090 100755
--- a/test/functional/test_framework/test_node.py
+++ b/test/functional/test_framework/test_node.py
@@ -23,6 +23,7 @@ import sys
from .authproxy import JSONRPCException
from .util import (
+ MAX_NODES,
append_config,
delete_cookie_file,
get_rpc_proxy,
@@ -110,10 +111,8 @@ class TestNode():
self.p2ps = []
- def get_deterministic_priv_key(self):
- """Return a deterministic priv key in base58, that only depends on the node's index"""
- AddressKeyPair = collections.namedtuple('AddressKeyPair', ['address', 'key'])
- PRIV_KEYS = [
+ AddressKeyPair = collections.namedtuple('AddressKeyPair', ['address', 'key'])
+ PRIV_KEYS = [
# address , privkey
AddressKeyPair('mjTkW3DjgyZck4KbiRusZsqTgaYTxdSz6z', 'cVpF924EspNh8KjYsfhgY96mmxvT6DgdWiTYMtMjuM74hJaU5psW'),
AddressKeyPair('msX6jQXvxiNhx3Q62PKeLPrhrqZQdSimTg', 'cUxsWyKyZ9MAQTaAhUQWJmBbSvHMwSmuv59KgxQV7oZQU3PXN3KE'),
@@ -124,8 +123,15 @@ class TestNode():
AddressKeyPair('myzuPxRwsf3vvGzEuzPfK9Nf2RfwauwYe6', 'cQMpDLJwA8DBe9NcQbdoSb1BhmFxVjWD5gRyrLZCtpuF9Zi3a9RK'),
AddressKeyPair('mumwTaMtbxEPUswmLBBN3vM9oGRtGBrys8', 'cSXmRKXVcoouhNNVpcNKFfxsTsToY5pvB9DVsFksF1ENunTzRKsy'),
AddressKeyPair('mpV7aGShMkJCZgbW7F6iZgrvuPHjZjH9qg', 'cSoXt6tm3pqy43UMabY6eUTmR3eSUYFtB2iNQDGgb3VUnRsQys2k'),
- ]
- return PRIV_KEYS[self.index]
+ AddressKeyPair('mq4fBNdckGtvY2mijd9am7DRsbRB4KjUkf', 'cN55daf1HotwBAgAKWVgDcoppmUNDtQSfb7XLutTLeAgVc3u8hik'),
+ AddressKeyPair('mpFAHDjX7KregM3rVotdXzQmkbwtbQEnZ6', 'cT7qK7g1wkYEMvKowd2ZrX1E5f6JQ7TM246UfqbCiyF7kZhorpX3'),
+ AddressKeyPair('mzRe8QZMfGi58KyWCse2exxEFry2sfF2Y7', 'cPiRWE8KMjTRxH1MWkPerhfoHFn5iHPWVK5aPqjW8NxmdwenFinJ'),
+ ]
+
+ def get_deterministic_priv_key(self):
+ """Return a deterministic priv key in base58, that only depends on the node's index"""
+ assert len(self.PRIV_KEYS) == MAX_NODES
+ return self.PRIV_KEYS[self.index]
def get_mem_rss_kilobytes(self):
"""Get the memory usage (RSS) per `ps`.