Browse Source

daemon: fix case where commit has nothing to do.

Prevents assert() triggering in queue_pkt_commit().

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
ppa-0.6.1
Rusty Russell 8 years ago
parent
commit
43db90391a
  1. 3
      daemon/peer.c

3
daemon/peer.c

@ -637,7 +637,8 @@ static void do_commit(struct peer *peer, struct command *jsoncmd)
if (!peer_uncommitted_changes(peer)) {
log_debug(peer->log, "do_commit: no changes to commit");
if (jsoncmd)
command_fail(jsoncmd, "no changes to commit");
command_fail(jsoncmd, "no changes to commit");
return;
}
log_debug(peer->log, "do_commit: sending commit command");

Loading…
Cancel
Save