Browse Source

db: Add table for onchaind transactions

These transactions being seen on the blockchain triggered some action in
onchaind so we need to replay them when we restore the onchaind.

Signed-off-by: Christian Decker <decker.christian@gmail.com>
ppa-0.6.1
Christian Decker 7 years ago
parent
commit
28feb2eb7d
  1. 12
      wallet/db.c

12
wallet/db.c

@ -306,6 +306,18 @@ char *dbmigrations[] = {
" SET faildetail = 'unspecified payment failure reason'"
" WHERE status = 2;", /* PAYMENT_FAILED */
/* -- Detailed payment faiure ends -- */
"CREATE TABLE channeltxs ("
/* The id serves as insertion order and short ID */
" id INTEGER"
", channel_id INTEGER REFERENCES channels(id) ON DELETE CASCADE"
", type INTEGER"
", transaction_id BLOB REFERENCES transactions(id) ON DELETE CASCADE"
/* The input_num is only used by the txo_watch, 0 if txwatch */
", input_num INTEGER"
/* The height at which we sent the depth notice */
", blockheight INTEGER REFERENCES blocks(height) ON DELETE CASCADE"
", PRIMARY KEY(id)"
");",
NULL,
};

Loading…
Cancel
Save