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

Function wallet_local_htlc_out_delete

wallet/wallet.c:2985–3002  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2983}
2984
2985void wallet_local_htlc_out_delete(struct wallet *wallet,
2986 struct channel *chan,
2987 const struct sha256 *payment_hash,
2988 u64 partid)
2989{
2990 struct db_stmt *stmt;
2991
2992 stmt = db_prepare_v2(wallet->db, SQL("DELETE FROM channel_htlcs"
2993 " WHERE direction = ?"
2994 " AND origin_htlc = ?"
2995 " AND payment_hash = ?"
2996 " AND partid = ?;"));
2997 db_bind_int(stmt, 0, DIRECTION_OUTGOING);
2998 db_bind_int(stmt, 1, 0);
2999 db_bind_sha256(stmt, 2, payment_hash);
3000 db_bind_u64(stmt, 3, partid);
3001 db_exec_prepared_v2(take(stmt));
3002}
3003
3004static struct wallet_payment *
3005find_unstored_payment(struct wallet *wallet,

Callers 1

send_payment_coreFunction · 0.85

Calls 4

db_bind_intFunction · 0.85
db_bind_sha256Function · 0.85
db_bind_u64Function · 0.85
db_exec_prepared_v2Function · 0.85

Tested by

no test coverage detected