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

Function param_s8_hundred

plugins/askrene/askrene.c:1230–1246  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1228}
1229
1230static struct command_result *param_s8_hundred(struct command *cmd,
1231 const char *name,
1232 const char *buffer,
1233 const jsmntok_t *tok,
1234 s8 **v)
1235{
1236 s64 s64val;
1237
1238 if (!json_to_s64(buffer, tok, &s64val)
1239 || s64val < -100
1240 || s64val > 100)
1241 return command_fail_badparam(cmd, name, buffer, tok,
1242 "should be a number between -100 and 100");
1243 *v = tal(cmd, s8);
1244 **v = s64val;
1245 return NULL;
1246}
1247
1248static struct command_result *json_askrene_bias_channel(struct command *cmd,
1249 const char *buffer,

Callers

nothing calls this directly

Calls 2

json_to_s64Function · 0.50
command_fail_badparamFunction · 0.50

Tested by

no test coverage detected