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

Function printwire_addresses

devtools/print_wire.c:154–175  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

152}
153
154static bool printwire_addresses(const u8 **cursor, size_t *plen, size_t len)
155{
156 struct wireaddr addr;
157 size_t to_go = len;
158 const size_t len_ref = *plen;
159
160 printf("[");
161 while (to_go && fromwire_wireaddr(cursor, plen, &addr)) {
162 to_go = len - (len_ref - *plen);
163 printf(" %s", fmt_wireaddr(NULL, &addr));
164 }
165 if (!*cursor)
166 return false;
167
168 if (to_go) {
169 printf(" UNKNOWN:");
170 if (!print_hexstring(cursor, plen, len))
171 return false;
172 }
173 printf(" ]\n");
174 return true;
175}
176
177static bool printwire_encoded_short_ids(const u8 **cursor, size_t *plen, size_t len)
178{

Callers 1

printwire_u8_arrayFunction · 0.85

Calls 3

fromwire_wireaddrFunction · 0.85
fmt_wireaddrFunction · 0.85
print_hexstringFunction · 0.85

Tested by

no test coverage detected