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

Function wallet_set_local_anchor

wallet/wallet.c:6771–6788  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6769}
6770
6771void wallet_set_local_anchor(struct wallet *w,
6772 u64 channel_id,
6773 const struct local_anchor_info *anchor,
6774 u64 remote_index)
6775{
6776 struct db_stmt *stmt;
6777
6778 stmt = db_prepare_v2(w->db,
6779 SQL("INSERT INTO local_anchors VALUES (?,?,?,?,?,?)"));
6780 db_bind_u64(stmt, channel_id);
6781 db_bind_u64(stmt, remote_index);
6782 db_bind_txid(stmt, &anchor->anchor_point.txid);
6783 db_bind_int(stmt, anchor->anchor_point.n);
6784 db_bind_amount_sat(stmt, anchor->commitment_fee);
6785 db_bind_int(stmt, anchor->commitment_weight);
6786 db_exec_prepared_v2(stmt);
6787 tal_free(stmt);
6788}
6789
6790void wallet_remove_local_anchors(struct wallet *w,
6791 u64 channel_id,

Callers 1

handle_local_anchorsFunction · 0.85

Calls 6

db_bind_u64Function · 0.85
db_bind_txidFunction · 0.85
db_bind_intFunction · 0.85
db_bind_amount_satFunction · 0.85
db_exec_prepared_v2Function · 0.85
tal_freeFunction · 0.85

Tested by

no test coverage detected