mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 15:14:23 +01:00
Add DEVELOPER flag, set by default.
This is a bit messier than I'd like, but we want to clearly remove all dev code (not just have it uncalled), so we remove fields and functions altogether rather than stub them out. This means we put #ifdefs in callers in some places, but at least it's explicit. We still run tests, but only a subset, and we run with NO_VALGRIND under Travis to avoid increasing test times too much. See-also: #176 Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
committed by
Christian Decker
parent
8d9818ff9c
commit
3c6eec87e3
@@ -25,6 +25,7 @@ LIGHTNINGD_CONFIG = {
|
||||
"locktime-blocks": 6,
|
||||
}
|
||||
|
||||
DEVELOPER = os.getenv("DEVELOPER", "0") == "1"
|
||||
|
||||
def write_config(filename, opts):
|
||||
with open(filename, 'w') as f:
|
||||
@@ -237,11 +238,11 @@ class LightningD(TailableProc):
|
||||
'--bitcoin-datadir={}'.format(bitcoin_dir),
|
||||
'--lightning-dir={}'.format(lightning_dir),
|
||||
'--port={}'.format(port),
|
||||
'--network=regtest',
|
||||
'--dev-broadcast-interval=1000',
|
||||
'--dev-hsm-seed={}'.format(seed.hex())
|
||||
'--network=regtest'
|
||||
]
|
||||
|
||||
if DEVELOPER:
|
||||
self.cmd_line += ['--dev-broadcast-interval=1000',
|
||||
'--dev-hsm-seed={}'.format(seed.hex())]
|
||||
self.cmd_line += ["--{}={}".format(k, v) for k, v in LIGHTNINGD_CONFIG.items()]
|
||||
self.prefix = 'lightningd(%d)' % (port)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user