daemon: reconnect support.

To do this we keep an order counter so we know how to retransmit.  We
could simply keep old packets, but this is a little clearer for now.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2016-08-18 14:25:08 +09:30
parent fd650ba79d
commit 3866d7605c
12 changed files with 688 additions and 41 deletions

View File

@@ -148,6 +148,7 @@ enum state state(struct peer *peer,
peer_add_their_commit(peer, &peer->remote.commit->txid,
peer->remote.commit->commit_num);
peer->remote.commit->order = peer->order_counter++;
queue_pkt_open_commit_sig(peer);
peer_watch_anchor(peer,
peer->local.mindepth,