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

Function param_unreleased_txid

plugins/txprepare.c:443–464  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

441}
442
443static struct command_result *param_unreleased_txid(struct command *cmd,
444 const char *name,
445 const char *buffer,
446 const jsmntok_t *tok,
447 struct unreleased_tx **utx)
448{
449 struct command_result *res;
450 struct bitcoin_txid *txid;
451
452 res = param_txid(cmd, name, buffer, tok, &txid);
453 if (res)
454 return res;
455
456 list_for_each(&unreleased_txs, (*utx), list) {
457 if (bitcoin_txid_eq(txid, &(*utx)->txid))
458 return NULL;
459 }
460
461 return command_fail(cmd, JSONRPC2_INVALID_PARAMS,
462 "not an unreleased txid '%s'",
463 fmt_bitcoin_txid(tmpctx, txid));
464}
465
466static struct command_result *json_txdiscard(struct command *cmd,
467 const char *buffer,

Callers

nothing calls this directly

Calls 3

param_txidFunction · 0.85
fmt_bitcoin_txidFunction · 0.85
command_failFunction · 0.70

Tested by

no test coverage detected