init: rebroadcast anchors on restart if we haven't seen them.

It's possible that we won't have sent the anchor, but state is
committed in db.  And our current philosophy is that we retransmit all
the txs dumbly, all the time.

Our --restart --timeout-anchor test trigger this case, too, so
re-enable that now.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2016-11-09 18:52:15 +10:30
parent 0f09605e17
commit 3aca5c87e3
4 changed files with 34 additions and 8 deletions

View File

@@ -554,6 +554,9 @@ int main(int argc, char *argv[])
/* If we loaded peers from database, reconnect now. */
reconnect_peers(dstate);
/* And send out anchors again if we're waiting. */
rebroadcast_anchors(dstate);
for (;;) {
struct timer *expired;