Rusty Russell
8c22bd9ee1
headers: fix up header idempotent lines.
For future reference, done via:
for f in `find wire/ bitcoin/ common/ lightningd -name '*.h' ! -name 'gen*'`; do ID=`echo -n LIGHTNING/$f | tr 'a-z' 'A-Z' | tr -cs 'A-Z0-9' _`; sed 's/^#\(ifndef\|define\) .*_H$/#\1 '$ID/ < $f | sed 's,#endif /..*_H ./$,#endif /* '$ID' */,' | bagto $f; done
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
7 years ago
Rusty Russell
a37c165cb9
common: move some files out of lightningd/
Basically all files shared by different daemons.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
7 years ago
Rusty Russell
a436fa77fc
lightningd/msg_queue: add msg_wake helper.
A cleaner wrapper than a raw io_wake.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
8 years ago
Rusty Russell
8be18ccfa1
lightningd/msg_queue: rename msg_is_fd to msg_extract_fd
Suggested-by: Christian Decker
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
8 years ago
Rusty Russell
bde872d34c
lightningd/msg_queue: support queueing/dequeueing of fds.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
8 years ago
Christian Decker
8ae698d1dc
Migrating daemon_conn to msg_queue and msg_queue takes over messages
We have some duplication in handling queues, so this is an attempt at
deduplicating some of that work. `daemon_conn` now uses the
`msg_queue` and `channeld` was also migrated to `msg_queue`. At the
same time I made `msg_queue` create a copy of the messages or takes
over messages marked with `take()`. This should make cleaning up
messages easier.
8 years ago
Rusty Russell
cd62b74b1c
lightningd/msg_queue: helper for queues of messages/
Since they're short, we use a simple array. This can be replaced later.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
8 years ago