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

Function extract_maxhops

plugins/askrene/askrene.c:120–132  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

118}
119
120static u32 extract_maxhops(const char ***layers, u32 default_maxhops)
121{
122 u32 maxhops = default_maxhops;
123 for (size_t i = 0; i < tal_count(*layers); i++) {
124 u32 v;
125 if (parse_maxhops((*layers)[i], &v)) {
126 maxhops = v;
127 tal_arr_remove(layers, i);
128 i--;
129 }
130 }
131 return maxhops;
132}
133
134/* Valid, known layers */
135static struct command_result *param_layer_names(struct command *cmd,

Callers 1

json_getroutesFunction · 0.85

Calls 1

parse_maxhopsFunction · 0.85

Tested by

no test coverage detected