mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 07:04:22 +01:00
elements: Give pytest some information about the test chain
We are checking against chain-dependent constants, so let's make sure we are using the ones for the correct chain. Signed-off-by: Christian Decker <decker.christian@gmail.com>
This commit is contained in:
committed by
Rusty Russell
parent
b016ce94e8
commit
cd93a855ce
@@ -305,3 +305,25 @@ def executor(teardown_checks):
|
||||
ex = futures.ThreadPoolExecutor(max_workers=20)
|
||||
yield ex
|
||||
ex.shutdown(wait=False)
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def chainparams():
|
||||
chainparams = {
|
||||
'regtest': {
|
||||
"bip173_prefix": "bcrt",
|
||||
"elements": False,
|
||||
"name": "regtest",
|
||||
"p2sh_prefix": '2',
|
||||
"elements": False,
|
||||
},
|
||||
'liquid-regtest': {
|
||||
"bip173_prefix": "ert",
|
||||
"elements": True,
|
||||
"name": "liquid-regtest",
|
||||
"p2sh_prefix": 'X',
|
||||
"elements": True,
|
||||
}
|
||||
}
|
||||
|
||||
return chainparams[config['TEST_NETWORK']]
|
||||
|
||||
Reference in New Issue
Block a user