wallet: Add new htlc column "localfailmsg" for outgoing htlcs.

We're going to change our internal structure next, so this is preparation.
We populate existing errors with temporary node failures, for simplicity.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2020-02-18 10:30:58 +10:30
parent cec18dfd6e
commit a150b09665
6 changed files with 41 additions and 13 deletions

View File

@@ -41,6 +41,8 @@ class Sqlite3Rewriter(Rewriter):
r'BIGSERIAL': 'INTEGER',
r'CURRENT_TIMESTAMP\(\)': "strftime('%s', 'now')",
r'INSERT INTO[ \t]+(.*)[ \t]+ON CONFLICT.*DO NOTHING;': 'INSERT OR IGNORE INTO \\1;',
# Rewrite "decode('abcd', 'hex')" to become "x'abcd'"
r'decode\((.*),\s*[\'\"]hex[\'\"]\)': 'x\\1',
}
return self.rewrite_types(query, typemapping)