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

Function args_string

plugins/bcli.c:171–187  ·  view source on GitHub ↗

For printing: simple string of args (no secrets!) */

Source from the content-addressed store, hash-verified

169
170/* For printing: simple string of args (no secrets!) */
171static char *args_string(const tal_t *ctx, const char **args)
172{
173 size_t i;
174 char *ret = tal_strdup(ctx, args[0]);
175
176 for (i = 1; args[i]; i++) {
177 ret = tal_strcat(ctx, take(ret), " ");
178 if (strstarts(args[i], "-rpcpassword")) {
179 ret = tal_strcat(ctx, take(ret), "-rpcpassword=...");
180 } else if (strstarts(args[i], "-rpcuser")) {
181 ret = tal_strcat(ctx, take(ret), "-rpcuser=...");
182 } else {
183 ret = tal_strcat(ctx, take(ret), args[i]);
184 }
185 }
186 return ret;
187}
188
189static char *bcli_args(struct bitcoin_cli *bcli)
190{

Callers 2

bcli_argsFunction · 0.85
bitcoind_failureFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected