lightningd: save the fee_states into the database.

This is the final step: we pass the complete fee_states to and from
channeld.

Changelog-Fixed: "Bad commitment signature" closing channels when we sent back-to-back update_fee messages across multiple reconnects.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2019-12-13 03:48:25 +10:30
committed by Christian Decker
parent 4270031d75
commit 72aa315b5e
19 changed files with 191 additions and 90 deletions

View File

@@ -82,6 +82,10 @@ void connect_succeeded(struct lightningd *ld UNNEEDED, const struct node_id *id
void delay_then_reconnect(struct channel *channel UNNEEDED, u32 seconds_delay UNNEEDED,
const struct wireaddr_internal *addrhint TAKES UNNEEDED)
{ fprintf(stderr, "delay_then_reconnect called!\n"); abort(); }
/* Generated stub for dup_fee_states */
struct fee_states *dup_fee_states(const tal_t *ctx UNNEEDED,
const struct fee_states *fee_states TAKES UNNEEDED)
{ fprintf(stderr, "dup_fee_states called!\n"); abort(); }
/* Generated stub for encode_scriptpubkey_to_addr */
char *encode_scriptpubkey_to_addr(const tal_t *ctx UNNEEDED,
const struct chainparams *chainparams UNNEEDED,
@@ -120,6 +124,11 @@ bool fromwire_onchain_dev_memleak_reply(const void *p UNNEEDED, bool *leak UNNEE
/* Generated stub for get_block_height */
u32 get_block_height(const struct chain_topology *topo UNNEEDED)
{ fprintf(stderr, "get_block_height called!\n"); abort(); }
/* Generated stub for get_feerate */
u32 get_feerate(const struct fee_states *fee_states UNNEEDED,
enum side funder UNNEEDED,
enum side side UNNEEDED)
{ fprintf(stderr, "get_feerate called!\n"); abort(); }
/* Generated stub for get_offered_bolt11features */
u8 *get_offered_bolt11features(const tal_t *ctx UNNEEDED)
{ fprintf(stderr, "get_offered_bolt11features called!\n"); abort(); }