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

Function printwire_addresses

devtools/print_wire.c:205–226  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

203}
204
205static bool printwire_addresses(const u8 **cursor, size_t *plen, size_t len)
206{
207 struct wireaddr addr;
208 size_t to_go = len;
209 const size_t len_ref = *plen;
210
211 printf("[");
212 while (to_go && fromwire_wireaddr(cursor, plen, &addr) == FROMWIREADDR_OK) {
213 to_go = len - (len_ref - *plen);
214 printf(" %s", fmt_wireaddr(NULL, &addr));
215 }
216 if (!*cursor)
217 return false;
218
219 if (to_go) {
220 printf(" UNKNOWN:");
221 if (!print_hexstring(cursor, plen, len))
222 return false;
223 }
224 printf(" ]\n");
225 return true;
226}
227
228static bool printwire_encoded_short_ids(const u8 **cursor, size_t *plen, size_t len)
229{

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