lnsocket

A minimal C library for connecting to the lightning network
git clone git://jb55.com/lnsocket
Log | Files | Refs | Submodules | README | LICENSE

commit e6e7c23a1f47325f6be592d281ac537bff49f700
parent 1460abf60ddea13002ad32a8e3e4b829c88b6261
Author: William Casarin <jb55@jb55.com>
Date:   Mon, 28 Feb 2022 17:13:02 -0800

misc cleanups

Signed-off-by: William Casarin <jb55@jb55.com>

Diffstat:
Mhandshake.c | 6++----
1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/handshake.c b/handshake.c @@ -400,8 +400,7 @@ int act_one_initiator(struct lnsocket *ln, struct handshake *h) if (!secp256k1_ecdh(ln->secp, h->ss.data, &h->their_id.pubkey, h->e.priv.secret.data, NULL, NULL)) { - note_error(&ln->errs, "handshake failed, secp256k1_ecdh error"); - return 0; + return note_error(&ln->errs, "handshake failed, secp256k1_ecdh error"); } /* BOLT #8: @@ -439,8 +438,7 @@ int act_one_initiator(struct lnsocket *ln, struct handshake *h) check_act_one(&h->act1); if (write(ln->socket, &h->act1, ACT_ONE_SIZE) != ACT_ONE_SIZE) { - note_error(&ln->errs, "handshake failed on initial send"); - return 0; + return note_error(&ln->errs, "handshake failed on initial send"); } return act_two_initiator(ln, h);