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

Function payments_by_hash

wallet/wallet.c:4535–4568  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4533}
4534
4535struct db_stmt *payments_by_hash(struct wallet *wallet,
4536 const struct sha256 *payment_hash)
4537{
4538 struct db_stmt *stmt;
4539 stmt = db_prepare_v2(wallet->db, SQL("SELECT"
4540 " id"
4541 ", updated_index"
4542 ", status"
4543 ", destination"
4544 ", msatoshi"
4545 ", payment_hash"
4546 ", timestamp"
4547 ", payment_preimage"
4548 ", path_secrets"
4549 ", route_nodes"
4550 ", route_channels"
4551 ", msatoshi_sent"
4552 ", description"
4553 ", bolt11"
4554 ", paydescription"
4555 ", failonionreply"
4556 ", total_msat"
4557 ", partid"
4558 ", local_invreq_id"
4559 ", groupid"
4560 ", completed_at"
4561 " FROM payments"
4562 " WHERE"
4563 " payment_hash = ?"
4564 " ORDER BY id;"));
4565 db_bind_sha256(stmt, payment_hash);
4566 db_query_prepared(stmt);
4567 return payments_next(wallet, stmt);
4568}
4569
4570struct db_stmt *payments_by_label(struct wallet *wallet,
4571 const struct json_escape *label)

Callers 3

check_progressFunction · 0.85
json_listsendpaysFunction · 0.85
json_delpayFunction · 0.85

Calls 3

db_bind_sha256Function · 0.85
db_query_preparedFunction · 0.85
payments_nextFunction · 0.85

Tested by

no test coverage detected