From 06bc035f595c0995c89191aaab19c5b57e27cbe1 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Thu, 25 May 2017 11:46:03 +0930 Subject: [PATCH] Minor fixes: feedback from Christian Signed-off-by: Rusty Russell --- lightningd/peer_control.c | 1 + lightningd/subd.h | 3 ++- tests/test_lightningd.py | 5 ++--- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/lightningd/peer_control.c b/lightningd/peer_control.c index 4138cf7b0..93b44c63e 100644 --- a/lightningd/peer_control.c +++ b/lightningd/peer_control.c @@ -36,6 +36,7 @@ #include #include +/* FIXME: Define serialization primitive for this? */ struct channel_info { secp256k1_ecdsa_signature commit_sig; struct channel_config their_config; diff --git a/lightningd/subd.h b/lightningd/subd.h index 7b67618fb..b29038eea 100644 --- a/lightningd/subd.h +++ b/lightningd/subd.h @@ -57,7 +57,8 @@ struct subd { * @msgname: function to get name from messages * @msgcb: function to call when non-fatal message received (or NULL) * @finished: function to call when it's finished (with exit status). - * @...: NULL-terminated list of pointers to fds to hand as fd 3, 4... (can be take, if so, set to -1) + * @...: NULL-terminated list of pointers to fds to hand as fd 3, 4... + * (can be take, if so, set to -1) * * @msgcb gets called with @fds set to NULL: if it returns a positive number, * that many @fds are received before calling again. If it returns -1, the diff --git a/tests/test_lightningd.py b/tests/test_lightningd.py index 6c91a4d52..a6989ee5a 100644 --- a/tests/test_lightningd.py +++ b/tests/test_lightningd.py @@ -96,9 +96,8 @@ class NodeFactory(object): daemon = utils.LightningD(lightning_dir, bitcoind.bitcoin_dir, port=port) # 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 file: - for d in disconnect: - file.write(d + "\n") + with open(os.path.join(lightning_dir, "dev_disconnect"), "w") as f: + f.write("\n".join(disconnect)) daemon.cmd_line.append("--dev-disconnect=dev_disconnect") # TODO(cdecker) Move into LIGHTNINGD_CONFIG once legacy daemon was removed daemon.cmd_line.append("--dev-broadcast-interval=1000")