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

Function opt_set_tlvname

devtools/decodemsg.c:11–30  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9#include <wire/peer_printgen.h>
10
11static char *opt_set_tlvname(const char *arg,
12 bool (**printwire)(const char *fieldname,
13 const u8 **cursor,
14 size_t *plen))
15{
16 for (size_t i = 0; tlvs_printpeer_wire_byname[i].name; i++) {
17 if (streq(arg, tlvs_printpeer_wire_byname[i].name)) {
18 *printwire = tlvs_printpeer_wire_byname[i].print;
19 return NULL;
20 }
21 }
22
23 for (size_t i = 0; tlvs_printonion_wire_byname[i].name; i++) {
24 if (streq(arg, tlvs_printonion_wire_byname[i].name)) {
25 *printwire = tlvs_printonion_wire_byname[i].print;
26 return NULL;
27 }
28 }
29 return "Unknown tlv name";
30}
31
32static char *opt_set_onionprint(bool (**printwire)(const u8 *msg))
33{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected