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

Function amount_asset_to_sat

common/amount.c:731–737  ·  view source on GitHub ↗

Convert from a generic asset to the fee-paying asset if possible. */

Source from the content-addressed store, hash-verified

729
730/* Convert from a generic asset to the fee-paying asset if possible. */
731struct amount_sat amount_asset_to_sat(struct amount_asset *amount)
732{
733 struct amount_sat sats;
734 assert(amount_asset_is_main(amount));
735 sats.satoshis = amount->value;
736 return sats;
737}
738
739struct amount_asset amount_sat_to_asset(struct amount_sat *sat, const u8 *asset) {
740 struct amount_asset amt_asset;

Callers 15

send_nextFunction · 0.70
trim_maximum_feerateFunction · 0.50
set_htlc_timeout_feeFunction · 0.50
resolve_htlc_txFunction · 0.50
steal_htlc_txFunction · 0.50
handle_our_unilateralFunction · 0.50
tell_wallet_to_remoteFunction · 0.50
handle_their_cheatFunction · 0.50
handle_their_unilateralFunction · 0.50
tx_parts_from_wally_txFunction · 0.50

Calls 1

amount_asset_is_mainFunction · 0.70

Tested by

no test coverage detected