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

Function psbt_txid

bitcoin/psbt.c:986–1007  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

984}
985
986void psbt_txid(const tal_t *ctx,
987 const struct wally_psbt *psbt,
988 struct bitcoin_txid *txid,
989 struct wally_tx **wtx)
990{
991 struct wally_tx *tx;
992 int wally_err;
993 assert(psbt->version == 2);
994
995 /* We rely on wally extractor to fill out all txid-related fields including scriptSigs */
996 tal_wally_start();
997 wally_err = wally_psbt_extract(psbt, WALLY_PSBT_EXTRACT_NON_FINAL, &tx);
998 assert(wally_err == WALLY_OK);
999 wally_err = wally_tx_get_txid(tx, txid->shad.sha.u.u8, sizeof(txid->shad.sha.u.u8));
1000 assert(wally_err == WALLY_OK);
1001 tal_wally_end(ctx);
1002
1003 if (wtx)
1004 *wtx = tx;
1005 else
1006 wally_tx_free(tx);
1007}
1008
1009struct amount_sat psbt_compute_fee(const struct wally_psbt *psbt)
1010{

Callers 15

splice_accepterFunction · 0.85
json_openchannel_signedFunction · 0.85
find_inprogress_inflightFunction · 0.85
handle_update_inflightFunction · 0.85
signpsbt_doneFunction · 0.85
finish_txprepareFunction · 0.85

Calls 2

tal_wally_startFunction · 0.85
tal_wally_endFunction · 0.85

Tested by

no test coverage detected