mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 07:04:22 +01:00
commit_tx & htlc_tx: use amount_sat/amount_msat.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -12,26 +12,27 @@ struct keyset;
|
||||
* commit_tx_num_untrimmed: how many of these htlc outputs will commit tx have?
|
||||
* @htlcs: tal_arr of HTLCs
|
||||
* @feerate_per_kw: feerate to use
|
||||
* @dust_limit_satoshis: dust limit below which to trim outputs.
|
||||
* @dust_limit: dust limit below which to trim outputs.
|
||||
* @side: from which side's point of view
|
||||
*
|
||||
* We need @side because HTLC fees are different for offered and
|
||||
* received HTLCs.
|
||||
*/
|
||||
size_t commit_tx_num_untrimmed(const struct htlc **htlcs,
|
||||
u32 feerate_per_kw, u64 dust_limit_satoshis,
|
||||
u32 feerate_per_kw,
|
||||
struct amount_sat dust_limit,
|
||||
enum side side);
|
||||
|
||||
/**
|
||||
* commit_tx: create (unsigned) commitment tx to spend the funding tx output
|
||||
* @ctx: context to allocate transaction and @htlc_map from.
|
||||
* @funding_txid, @funding_out, @funding_satoshis: funding outpoint.
|
||||
* @funding_txid, @funding_out, @funding: funding outpoint.
|
||||
* @funder: is the LOCAL or REMOTE paying the fee?
|
||||
* @keyset: keys derived for this commit tx.
|
||||
* @feerate_per_kw: feerate to use
|
||||
* @dust_limit_satoshis: dust limit below which to trim outputs.
|
||||
* @self_pay_msat: amount to pay directly to self
|
||||
* @other_pay_msat: amount to pay directly to the other side
|
||||
* @dust_limit: dust limit below which to trim outputs.
|
||||
* @self_pay: amount to pay directly to self
|
||||
* @other_pay: amount to pay directly to the other side
|
||||
* @htlcs: tal_arr of htlcs committed by transaction (some may be trimmed)
|
||||
* @htlc_map: outputed map of outnum->HTLC (NULL for direct outputs).
|
||||
* @obscured_commitment_number: number to encode in commitment transaction
|
||||
@@ -44,14 +45,14 @@ size_t commit_tx_num_untrimmed(const struct htlc **htlcs,
|
||||
struct bitcoin_tx *commit_tx(const tal_t *ctx,
|
||||
const struct bitcoin_txid *funding_txid,
|
||||
unsigned int funding_txout,
|
||||
u64 funding_satoshis,
|
||||
struct amount_sat funding,
|
||||
enum side funder,
|
||||
u16 to_self_delay,
|
||||
const struct keyset *keyset,
|
||||
u32 feerate_per_kw,
|
||||
u64 dust_limit_satoshis,
|
||||
u64 self_pay_msat,
|
||||
u64 other_pay_msat,
|
||||
struct amount_sat dust_limit,
|
||||
struct amount_msat self_pay,
|
||||
struct amount_msat other_pay,
|
||||
const struct htlc **htlcs,
|
||||
const struct htlc ***htlcmap,
|
||||
u64 obscured_commitment_number,
|
||||
|
||||
Reference in New Issue
Block a user