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

Function print_hexstring

devtools/print_wire.c:148–160  ·  view source on GitHub ↗

Returns false if we ran out of data. */

Source from the content-addressed store, hash-verified

146
147/* Returns false if we ran out of data. */
148static bool print_hexstring(const u8 **cursor, size_t *plen, size_t len)
149{
150 while (len) {
151 u8 v = fromwire_u8(cursor, plen);
152 if (!*cursor) {
153 printf("**TRUNCATED**\n");
154 return false;
155 }
156 printf("%02x", v);
157 len--;
158 }
159 return true;
160}
161
162bool printwire_utf8_array(const char *fieldname, const u8 **cursor, size_t *plen, size_t len)
163{

Callers 4

printwire_utf8_arrayFunction · 0.85
printwire_addressesFunction · 0.85
printwire_u8_arrayFunction · 0.85

Calls 1

fromwire_u8Function · 0.50

Tested by

no test coverage detected