MCPcopy Create free account
hub / github.com/ElementsProject/lightning / wallet_htlc_sigs_add

Function wallet_htlc_sigs_add

wallet/wallet.c:4748–4766  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4746}
4747
4748void wallet_htlc_sigs_add(struct wallet *w, u64 channel_id,
4749 struct bitcoin_outpoint inflight_outpoint,
4750 const struct bitcoin_signature *htlc_sigs)
4751{
4752 struct db_stmt *stmt;
4753
4754 /* Now insert the new ones */
4755 for (size_t i=0; i<tal_count(htlc_sigs); i++) {
4756 stmt = db_prepare_v2(w->db,
4757 SQL("INSERT INTO htlc_sigs (channelid,"
4758 " inflight_tx_id, inflight_tx_outnum,"
4759 " signature) VALUES (?, ?, ?, ?)"));
4760 db_bind_u64(stmt, channel_id);
4761 db_bind_txid(stmt, &inflight_outpoint.txid);
4762 db_bind_int(stmt, inflight_outpoint.n);
4763 db_bind_signature(stmt, &htlc_sigs[i].s);
4764 db_exec_prepared_v2(take(stmt));
4765 }
4766}
4767
4768bool wallet_sanity_check(struct wallet *w)
4769{

Callers 1

peer_got_commitsigFunction · 0.85

Calls 5

db_bind_u64Function · 0.85
db_bind_txidFunction · 0.85
db_bind_intFunction · 0.85
db_bind_signatureFunction · 0.85
db_exec_prepared_v2Function · 0.85

Tested by

no test coverage detected