Skip to content

Commit

Permalink
QA: Use resgtest2 chain instead of regtest for rpc tests (except rpc_…
Browse files Browse the repository at this point in the history
…getblockstats)
  • Loading branch information
jtimon committed Oct 3, 2019
1 parent 902ef36 commit 797230a
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion test/README.md
Expand Up @@ -204,7 +204,7 @@ test run:
Use the path to find the pid file in the temp folder:

```bash
cat /tmp/user/1000/testo9vsdjo3/node1/regtest/bitcoind.pid
cat /tmp/user/1000/testo9vsdjo3/node1/regtest2/bitcoind.pid
```

Then you can use the pid to start `gdb`:
Expand Down
2 changes: 1 addition & 1 deletion test/functional/combine_logs.py
Expand Up @@ -83,7 +83,7 @@ def read_logs(tmp_dir):
chain = chain[0] # pick the first one if more than one chain was found (should never happen)
chain = re.search(r'node0/(.+?)/debug\.log$', chain).group(1) # extract the chain name
else:
chain = 'regtest' # fallback to regtest (should only happen when none exists)
chain = 'regtest2' # fallback to regtest2 (should only happen when none exists)

files = [("test", "%s/test_framework.log" % tmp_dir)]
for i in itertools.count():
Expand Down
1 change: 1 addition & 0 deletions test/functional/rpc_getblockstats.py
Expand Up @@ -31,6 +31,7 @@ def add_options(self, parser):
help='Test data file')

def set_test_params(self):
self.chain = 'regtest'
self.num_nodes = 1
self.setup_clean_chain = True

Expand Down
3 changes: 2 additions & 1 deletion test/functional/test_framework/mininode.py
Expand Up @@ -83,9 +83,10 @@
}

MAGIC_BYTES = {
"mainnet": b"\xf9\xbe\xb4\xd9", # mainnet
"main": b"\xf9\xbe\xb4\xd9", # mainnet
"testnet3": b"\x0b\x11\x09\x07", # testnet3
"regtest": b"\xfa\xbf\xb5\xda", # regtest
"regtest2": b"\xfa\xbf\xb5\xda", # -chain=regtest2
}


Expand Down
2 changes: 1 addition & 1 deletion test/functional/test_framework/test_framework.py
Expand Up @@ -91,7 +91,7 @@ class BitcoinTestFramework(metaclass=BitcoinTestMetaClass):

def __init__(self):
"""Sets test framework defaults. Do not override this method. Instead, override the set_test_params() method"""
self.chain = 'regtest'
self.chain = 'regtest2'
self.setup_clean_chain = False
self.nodes = []
self.network_thread = None
Expand Down

0 comments on commit 797230a

Please sign in to comment.