Skip to content

Commit 0da5e72

Browse files
committed
QA: Use resgtest2 chain instead of regtest for rpc tests (except rpc_getblockstats)
1 parent 635771d commit 0da5e72

File tree

5 files changed

+6
-4
lines changed

5 files changed

+6
-4
lines changed

Diff for: test/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ test run:
204204
Use the path to find the pid file in the temp folder:
205205

206206
```bash
207-
cat /tmp/user/1000/testo9vsdjo3/node1/regtest/bitcoind.pid
207+
cat /tmp/user/1000/testo9vsdjo3/node1/regtest2/bitcoind.pid
208208
```
209209

210210
Then you can use the pid to start `gdb`:

Diff for: test/functional/combine_logs.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ def read_logs(tmp_dir):
8383
chain = chain[0] # pick the first one if more than one chain was found (should never happen)
8484
chain = re.search(r'node0/(.+?)/debug\.log$', chain).group(1) # extract the chain name
8585
else:
86-
chain = 'regtest' # fallback to regtest (should only happen when none exists)
86+
chain = 'regtest2' # fallback to regtest2 (should only happen when none exists)
8787

8888
files = [("test", "%s/test_framework.log" % tmp_dir)]
8989
for i in itertools.count():

Diff for: test/functional/rpc_getblockstats.py

+1
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ def add_options(self, parser):
3131
help='Test data file')
3232

3333
def set_test_params(self):
34+
self.chain = 'regtest'
3435
self.num_nodes = 1
3536
self.setup_clean_chain = True
3637

Diff for: test/functional/test_framework/mininode.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,10 @@
8383
}
8484

8585
MAGIC_BYTES = {
86-
"mainnet": b"\xf9\xbe\xb4\xd9", # mainnet
86+
"main": b"\xf9\xbe\xb4\xd9", # mainnet
8787
"testnet3": b"\x0b\x11\x09\x07", # testnet3
8888
"regtest": b"\xfa\xbf\xb5\xda", # regtest
89+
"regtest2": b"\xfa\xbf\xb5\xda", # -chain=regtest2
8990
}
9091

9192

Diff for: test/functional/test_framework/test_framework.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ class BitcoinTestFramework(metaclass=BitcoinTestMetaClass):
8989
9090
This class also contains various public and private helper methods."""
9191

92-
def __init__(self, chain='regtest'):
92+
def __init__(self, chain='regtest2'):
9393
"""Sets test framework defaults. Do not override this method. Instead, override the set_test_params() method"""
9494
self.chain = chain
9595
self.setup_clean_chain = False

0 commit comments

Comments
 (0)