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

Function describe_failcode

plugins/libplugin-pay.c:1119–1140  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1117}
1118
1119static char *describe_failcode(const tal_t *ctx, enum onion_wire failcode)
1120{
1121 char *rv = tal_strdup(ctx, "");
1122 if (failcode & BADONION) {
1123 tal_append_fmt(&rv, "BADONION|");
1124 failcode &= ~BADONION;
1125 }
1126 if (failcode & PERM) {
1127 tal_append_fmt(&rv, "PERM|");
1128 failcode &= ~PERM;
1129 }
1130 if (failcode & NODE) {
1131 tal_append_fmt(&rv, "NODE|");
1132 failcode &= ~NODE;
1133 }
1134 if (failcode & UPDATE) {
1135 tal_append_fmt(&rv, "UPDATE|");
1136 failcode &= ~UPDATE;
1137 }
1138 tal_append_fmt(&rv, "%u", failcode);
1139 return rv;
1140}
1141
1142static struct command_result *
1143handle_final_failure(struct command *cmd,

Callers 2

handle_final_failureFunction · 0.85

Calls 1

tal_append_fmtFunction · 0.85

Tested by

no test coverage detected