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

Function opt_set_network

common/configdir.c:131–146  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

129}
130
131static char *opt_set_network(const char *arg, void *unused)
132{
133 assert(arg != NULL);
134
135 /* Ignore if called directly from opt (e.g. lightning-cli) */
136 if (!current_cv)
137 return NULL;
138
139 if (current_cv->src == CONFIGVAR_NETWORK_CONF)
140 return "not permitted in network-specific configuration files";
141 /* Set the global chainparams instance */
142 chainparams = chainparams_for_network(arg);
143 if (!chainparams)
144 return tal_fmt(NULL, "Unknown network name '%s'", arg);
145 return NULL;
146}
147
148static char *opt_set_specific_network(const char *network)
149{

Callers 1

opt_set_specific_networkFunction · 0.70

Calls 1

chainparams_for_networkFunction · 0.85

Tested by

no test coverage detected