core-lightning/wallet
Rusty Russell cefb6925b2 db: save and restore last_sent_commit correctly.
It's an array: we were only saving the single element; if there was more than
one changed HTLC we'd get a bad signature!

The report in #1907 is probably caused by the other side re-requesting
something we considered already finalized; to avoid this particular error,
we should set the field to NULL if there's no last_sent_commit.

I'm increasingly of the opinion we want to just save all the update
packets to the db and blast them out, instead of doing this
second-guessing dance.

Fixes: #1907
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-09-04 14:43:27 +02:00
..
test db: save and restore last_sent_commit correctly. 2018-09-04 14:43:27 +02:00
.gitignore wallet: Create and manage a sqlite3 database for the wallet 2017-06-06 09:16:10 +09:30
db.c db: save and restore last_sent_commit correctly. 2018-09-04 14:43:27 +02:00
db.h db: full location tags for callers, make it implicit. 2018-04-27 16:20:35 +02:00
invoices.c wallet: do wallet_invoice init during preparation. 2018-09-03 05:01:40 +00:00
invoices.h wallet: do wallet_invoice init during preparation. 2018-09-03 05:01:40 +00:00
Makefile wallet: add check-source to makefile. 2018-03-07 18:55:51 +01:00
txfilter.c Remove tal_len, use tal_count() or tal_bytelen(). 2018-07-30 11:31:17 +02:00
txfilter.h Use expected LIGHTNING_DIR_FILE_H define 2018-03-25 23:54:21 +00:00
wallet.c db: save and restore last_sent_commit correctly. 2018-09-04 14:43:27 +02:00
wallet.h lightningd: move channel/peer/htlc load into own function. 2018-09-03 05:01:40 +00:00
walletrpc.c feerate: allow names 'urgent' 'normal' and 'slow'. 2018-08-30 16:33:35 +02:00
walletrpc.h Use expected LIGHTNING_DIR_FILE_H define 2018-03-25 23:54:21 +00:00