Minor cleanups: things found while debugging the database code.

1. Fix #ifdef DEBUG code in signature.c so it compiles.
2. Don't set peer->closing.our_script in queue_pkt_close_shutdown: it's
   assigned in caller already.
3. Wrap setting of htlc's rval in set_htlc_rval() function.
4. Log where we were when unexpected packet comes in.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2016-08-18 14:25:13 +09:30
parent 0bb183e028
commit be38d3f507
5 changed files with 30 additions and 27 deletions

View File

@@ -51,8 +51,8 @@ static void dump_tx(const char *msg,
fprintf(stderr, "%02x", script[i]);
if (key) {
fprintf(stderr, "\nPubkey: ");
for (i = 0; i < sizeof(key->der); i++)
fprintf(stderr, "%02x", key->der[i]);
for (i = 0; i < sizeof(key->pubkey); i++)
fprintf(stderr, "%02x", ((u8 *)&key->pubkey)[i]);
fprintf(stderr, "\n");
}
if (h) {