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

Function string_to_payment_status

lightningd/pay.c:40–54  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

38};
39
40static bool string_to_payment_status(const char *status_str, size_t len,
41 enum wallet_payment_status *status)
42{
43 if (memeqstr(status_str, len, "complete")) {
44 *status = PAYMENT_COMPLETE;
45 return true;
46 } else if (memeqstr(status_str, len, "pending")) {
47 *status = PAYMENT_PENDING;
48 return true;
49 } else if (memeqstr(status_str, len, "failed")) {
50 *status = PAYMENT_FAILED;
51 return true;
52 }
53 return false;
54}
55
56static const char *payment_status_to_string(const enum wallet_payment_status status)
57{

Callers 1

param_payment_statusFunction · 0.85

Calls 1

memeqstrFunction · 0.85

Tested by

no test coverage detected