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

Function string_to_forward_status

lightningd/forwards.c:67–85  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

65}
66
67bool string_to_forward_status(const char *status_str,
68 size_t len,
69 enum forward_status *status)
70{
71 if (memeqstr(status_str, len, "offered")) {
72 *status = FORWARD_OFFERED;
73 return true;
74 } else if (memeqstr(status_str, len, "settled")) {
75 *status = FORWARD_SETTLED;
76 return true;
77 } else if (memeqstr(status_str, len, "failed")) {
78 *status = FORWARD_FAILED;
79 return true;
80 } else if (memeqstr(status_str, len, "local_failed")) {
81 *status = FORWARD_LOCAL_FAILED;
82 return true;
83 }
84 return false;
85}
86
87/* Warp this process to ensure the consistent json object structure
88 * between 'listforwards' API and 'forward_event' notification. */

Callers 1

param_forward_statusFunction · 0.85

Calls 1

memeqstrFunction · 0.85

Tested by

no test coverage detected