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

Function payments_by_label

wallet/wallet.c:4570–4603  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4568}
4569
4570struct db_stmt *payments_by_label(struct wallet *wallet,
4571 const struct json_escape *label)
4572{
4573 struct db_stmt *stmt;
4574 stmt = db_prepare_v2(wallet->db, SQL("SELECT"
4575 " id"
4576 ", updated_index"
4577 ", status"
4578 ", destination"
4579 ", msatoshi"
4580 ", payment_hash"
4581 ", timestamp"
4582 ", payment_preimage"
4583 ", path_secrets"
4584 ", route_nodes"
4585 ", route_channels"
4586 ", msatoshi_sent"
4587 ", description"
4588 ", bolt11"
4589 ", paydescription"
4590 ", failonionreply"
4591 ", total_msat"
4592 ", partid"
4593 ", local_invreq_id"
4594 ", groupid"
4595 ", completed_at"
4596 " FROM payments"
4597 " WHERE"
4598 /* label is called "description" in db */
4599 " description = ?;"));
4600 db_bind_json_escape(stmt, label);
4601 db_query_prepared(stmt);
4602 return payments_next(wallet, stmt);
4603}
4604
4605struct db_stmt *payments_by_status(struct wallet *wallet,
4606 enum payment_status status,

Callers 1

prev_paymentFunction · 0.85

Calls 3

db_bind_json_escapeFunction · 0.85
db_query_preparedFunction · 0.85
payments_nextFunction · 0.85

Tested by

no test coverage detected