| 1064 | } |
| 1065 | |
| 1066 | void wallet_inflight_save(struct wallet *w, |
| 1067 | struct channel_inflight *inflight) |
| 1068 | { |
| 1069 | struct db_stmt *stmt; |
| 1070 | /* The *only* thing you can update on an |
| 1071 | * inflight is the funding PSBT (to add sigs) |
| 1072 | * ((and maybe later the last_tx/last_sig if this is for |
| 1073 | * a splice */ |
| 1074 | stmt = db_prepare_v2(w->db, |
| 1075 | SQL("UPDATE channel_funding_inflights SET" |
| 1076 | " funding_psbt=?" // 0 |
| 1077 | ", funding_tx_remote_sigs_received=?" // 1 |
| 1078 | " WHERE" |
| 1079 | " channel_id=?" // 2 |
| 1080 | " AND funding_tx_id=?" // 3 |
| 1081 | " AND funding_tx_outnum=?")); // 4 |
| 1082 | db_bind_psbt(stmt, 0, inflight->funding_psbt); |
| 1083 | db_bind_int(stmt, 1, inflight->remote_tx_sigs); |
| 1084 | db_bind_u64(stmt, 2, inflight->channel->dbid); |
| 1085 | db_bind_txid(stmt, 3, &inflight->funding->outpoint.txid); |
| 1086 | db_bind_int(stmt, 4, inflight->funding->outpoint.n); |
| 1087 | |
| 1088 | db_exec_prepared_v2(take(stmt)); |
| 1089 | } |
| 1090 | |
| 1091 | void wallet_channel_clear_inflights(struct wallet *w, |
| 1092 | struct channel *chan) |
no test coverage detected