mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-01-18 05:12:45 +01:00
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>
This commit is contained in:
parent
4547afba33
commit
28feb2eb7d
12
wallet/db.c
12
wallet/db.c
@ -306,6 +306,18 @@ char *dbmigrations[] = {
|
|||||||
" SET faildetail = 'unspecified payment failure reason'"
|
" SET faildetail = 'unspecified payment failure reason'"
|
||||||
" WHERE status = 2;", /* PAYMENT_FAILED */
|
" WHERE status = 2;", /* PAYMENT_FAILED */
|
||||||
/* -- Detailed payment faiure ends -- */
|
/* -- 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,
|
NULL,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user