db: store claimed per_commitment_point from option_data_loss_protect.

This means we don't try to unilaterally close after a restart, *and*
we can tell onchaind to try to use the point to recover funds when the
peer unilaterally closes.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2018-08-17 14:36:36 +09:30
committed by Christian Decker
parent 1a4084442b
commit a5ecc95c42
7 changed files with 37 additions and 10 deletions

View File

@@ -202,7 +202,8 @@ wallet_commit_channel(struct lightningd *ld,
/* We are connected */
true,
&uc->local_basepoints,
&uc->local_funding_pubkey);
&uc->local_funding_pubkey,
NULL);
/* Now we finally put it in the database. */
wallet_channel_insert(ld->wallet, channel);