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

Function fromwire_wally_psbt

bitcoin/psbt.c:964–984  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

962}
963
964struct wally_psbt *fromwire_wally_psbt(const tal_t *ctx,
965 const u8 **cursor, size_t *max)
966{
967 struct wally_psbt *psbt;
968 u32 psbt_byte_len;
969 const u8 *psbt_buf;
970
971 psbt_byte_len = fromwire_u32(cursor, max);
972 psbt_buf = fromwire(cursor, max, NULL, psbt_byte_len);
973 if (!psbt_buf || psbt_byte_len == 0)
974 return NULL;
975
976 psbt = psbt_from_bytes(ctx, psbt_buf, psbt_byte_len);
977 if (!psbt)
978 return fromwire_fail(cursor, max);
979
980 /* Internally we always operate on v2 */
981 psbt_set_version(psbt, 2);
982
983 return psbt;
984}
985
986void psbt_txid(const tal_t *ctx,
987 const struct wally_psbt *psbt,

Callers 2

fromwire_bitcoin_txFunction · 0.85
fromwire_inflightFunction · 0.85

Calls 5

psbt_from_bytesFunction · 0.85
psbt_set_versionFunction · 0.85
fromwire_u32Function · 0.50
fromwireFunction · 0.50
fromwire_failFunction · 0.50

Tested by

no test coverage detected