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

Function param_unreleased_txid

plugins/txprepare.c:428–449  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

426}
427
428static struct command_result *param_unreleased_txid(struct command *cmd,
429 const char *name,
430 const char *buffer,
431 const jsmntok_t *tok,
432 struct unreleased_tx **utx)
433{
434 struct command_result *res;
435 struct bitcoin_txid *txid;
436
437 res = param_txid(cmd, name, buffer, tok, &txid);
438 if (res)
439 return res;
440
441 list_for_each(&unreleased_txs, (*utx), list) {
442 if (bitcoin_txid_eq(txid, &(*utx)->txid))
443 return NULL;
444 }
445
446 return command_fail(cmd, JSONRPC2_INVALID_PARAMS,
447 "not an unreleased txid '%s'",
448 type_to_string(tmpctx, struct bitcoin_txid, txid));
449}
450
451static struct command_result *json_txdiscard(struct command *cmd,
452 const char *buffer,

Callers

nothing calls this directly

Calls 3

param_txidFunction · 0.85
command_failFunction · 0.70
type_to_stringClass · 0.50

Tested by

no test coverage detected