channeld: Code to implement splicing

Update the lightningd <-> channeld interface with lots of new commands to needed to facilitate spicing.

Implement the channeld splicing protocol leveraging the interactivetx protocol.

Implement lightningd’s channel_control to support channeld in its splicing efforts.

Changelog-Added: Added the features to enable splicing & resizing of active channels.
This commit is contained in:
Dusty Daemon
2023-07-27 14:37:52 -07:00
committed by Rusty Russell
parent ebd0a3fd69
commit 4628e3ace8
88 changed files with 4560 additions and 644 deletions

View File

@@ -81,6 +81,12 @@ void db_bind_u64(struct db_stmt *stmt, u64 val)
stmt->bindings[pos].v.u64 = val;
}
void db_bind_s64(struct db_stmt *stmt, s64 val)
{
u64 uval = val;
db_bind_u64(stmt, uval);
}
void db_bind_blob(struct db_stmt *stmt, const u8 *val, size_t len)
{
size_t pos = check_bind_pos(stmt);
@@ -277,6 +283,11 @@ u64 db_col_u64(struct db_stmt *stmt, const char *colname)
return stmt->db->config->column_u64_fn(stmt, col);
}
u64 db_col_s64(struct db_stmt *stmt, const char *colname)
{
return db_col_u64(stmt, colname);
}
int db_col_int_or_default(struct db_stmt *stmt, const char *colname, int def)
{
size_t col = db_query_colnum(stmt, colname);