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

Function amount_asset_extract_value

common/amount.c:748–760  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

746}
747
748u8 *amount_asset_extract_value(const tal_t *ctx, struct amount_asset *asset)
749{
750 u8 *val = tal_arr(ctx, u8, 9);
751
752 /* FIXME: persist blinded values */
753 if (asset->value == 0)
754 return NULL;
755
756 beint64_t be64 = cpu_to_be64(asset->value);
757 val[0] = 0x01;
758 memcpy(val + 1, &be64, sizeof(be64));
759 return val;
760}
761
762struct amount_msat fromwire_amount_msat(const u8 **cursor, size_t *max)
763{

Callers

nothing calls this directly

Calls 1

cpu_to_be64Function · 0.85

Tested by

no test coverage detected