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

@@ -294,7 +294,7 @@ enum state state(struct peer *peer,
return next_state(peer, input, STATE_ERR_INTERNAL);
unexpected_pkt:
peer_unexpected_pkt(peer, pkt);
peer_unexpected_pkt(peer, pkt, __func__);
/* Don't reply to an error with an error. */
if (!input_is(input, PKT_ERROR)) {