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

Function attempt_ongoing

plugins/pay.c:239–254  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

237}
238
239static bool attempt_ongoing(const struct sha256 *payment_hash)
240{
241 struct payment *root;
242 struct payment_tree_result res;
243 enum payment_step diff,
244 final_states = PAYMENT_STEP_FAILED | PAYMENT_STEP_SUCCESS;
245
246 list_for_each(&payments, root, list) {
247 if (!sha256_eq(payment_hash, root->payment_hash))
248 continue;
249 res = payment_collect_result(root);
250 diff = res.leafstates & ~final_states;
251 return diff != 0;
252 }
253 return false;
254}
255
256/* A unique key for each payment attempt, even if the same invoice was
257 * attempted multiple times. */

Callers 1

add_new_entryFunction · 0.85

Calls 1

payment_collect_resultFunction · 0.85

Tested by

no test coverage detected