core-lightning/hsmd
Rusty Russell 6b6b7eac61 hsmd: use status_conn to send bad_request messages, make handlers uniform.
The current code sends hsmstatus_client_bad_request via the req fd;
this won't work, since lightningd uses that synchronously and only
expects a reply to its commands.  So send it via status_conn.

We also enhance hsmstatus_client_bad_request to include details, and
create convenience functions for it.  Our previous handling was ad-hoc;
we sometimes just closed on the client without telling lightningd,
and sometimes we didn't tell lightningd *which* client was broken.

Also make every handler the exact same prototype, so they now use the
exact same patterns (hsmd *only* handles requests, makes replies).

I tested this manually by corrupting a request to hsmd.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-09-20 09:49:39 +02:00
..
capabilities.h hsmd: add message to sign the mutual close transaction. 2018-07-24 00:40:01 +02:00
client.c tools/generate-wire.py: remove length argument from fromwire_ routines. 2018-02-20 22:36:21 +01:00
client.h Use expected LIGHTNING_DIR_FILE_H define 2018-03-25 23:54:21 +00:00
hsm_client_wire_csv hsmd: use status_conn to send bad_request messages, make handlers uniform. 2018-09-20 09:49:39 +02:00
hsmd.c hsmd: use status_conn to send bad_request messages, make handlers uniform. 2018-09-20 09:49:39 +02:00
Makefile Put the 'd' back in the daemons. 2018-09-03 05:01:40 +00:00