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

Function wallet_annotation_add

wallet/wallet.c:4085–4104  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4083}
4084
4085static void wallet_annotation_add(struct wallet *w, const struct bitcoin_txid *txid, int num,
4086 enum wallet_tx_annotation_type annotation_type, enum wallet_tx_type type, u64 channel)
4087{
4088 struct db_stmt *stmt;
4089
4090 stmt = db_prepare_v2(
4091 w->db,SQL("INSERT INTO transaction_annotations "
4092 "(txid, idx, location, type, channel) "
4093 "VALUES (?, ?, ?, ?, ?) ON CONFLICT(txid,idx) DO NOTHING;"));
4094
4095 db_bind_txid(stmt, 0, txid);
4096 db_bind_int(stmt, 1, num);
4097 db_bind_int(stmt, 2, annotation_type);
4098 db_bind_int(stmt, 3, type);
4099 if (channel != 0)
4100 db_bind_u64(stmt, 4, channel);
4101 else
4102 db_bind_null(stmt, 4);
4103 db_exec_prepared_v2(take(stmt));
4104}
4105
4106void wallet_annotate_txout(struct wallet *w,
4107 const struct bitcoin_outpoint *outpoint,

Callers 2

wallet_annotate_txoutFunction · 0.85
wallet_annotate_txinFunction · 0.85

Calls 5

db_bind_txidFunction · 0.85
db_bind_intFunction · 0.85
db_bind_u64Function · 0.85
db_bind_nullFunction · 0.85
db_exec_prepared_v2Function · 0.85

Tested by

no test coverage detected