mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-24 01:24:26 +01:00
pytest: Give lightningd nodes a numeric ID to prefix logs
This used to be the port, but since we no longer have fixed ports, and we start them in random order we can't easily distinguish them by the port anymore. Just use a numeric ID that matches their lightning-dirs. Signed-off-by: Christian Decker <decker.christian@gmail.com>
This commit is contained in:
committed by
Rusty Russell
parent
65cac1ba85
commit
6231e9969f
@@ -163,7 +163,10 @@ class NodeFactory(object):
|
||||
shutil.rmtree(lightning_dir)
|
||||
|
||||
socket_path = os.path.join(lightning_dir, "lightning-rpc").format(node_id)
|
||||
daemon = utils.LightningD(lightning_dir, self.bitcoind.bitcoin_dir, port=port, random_hsm=random_hsm)
|
||||
daemon = utils.LightningD(
|
||||
lightning_dir, self.bitcoind.bitcoin_dir,
|
||||
port=port, random_hsm=random_hsm, node_id=node_id
|
||||
)
|
||||
# If we have a disconnect string, dump it to a file for daemon.
|
||||
if disconnect:
|
||||
with open(os.path.join(lightning_dir, "dev_disconnect"), "w") as f:
|
||||
|
||||
Reference in New Issue
Block a user