Skip to content

Commit b2f7685

Browse files
committed
f - clean up docs
1 parent 9b3c3e1 commit b2f7685

File tree

1 file changed

+15
-13
lines changed

1 file changed

+15
-13
lines changed

lightning/src/ln/interactivetxs.rs

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1878,26 +1878,28 @@ impl InteractiveTxConstructor {
18781878
}
18791879
}
18801880

1881-
/// Determine whether a change output should be added, and if yes, of what size,
1882-
/// considering our given inputs & outputs, and intended contribution.
1883-
/// Computes the fees, takes into account the fees and the dust limit.
1881+
/// Determine whether a change output should be added, and if yes, of what size, considering our
1882+
/// given inputs and outputs, and intended contribution. Takes into account the fees and the dust
1883+
/// limit.
1884+
///
18841885
/// Three outcomes are possible:
18851886
/// - Inputs are sufficient for intended contribution, fees, and a larger-than-dust change:
18861887
/// `Ok(Some(change_amount))`
18871888
/// - Inputs are sufficient for intended contribution and fees, and a change output isn't needed:
18881889
/// `Ok(None)`
1889-
/// - Inputs are not sufficent to cover contribution and fees:
1890+
/// - Inputs are not sufficient to cover contribution and fees:
18901891
/// `Err(AbortReason::InsufficientFees)`
1892+
///
18911893
/// Parameters:
1892-
/// * `is_initiator` - Whether we are the negotiation initiator or not (acceptor).
1893-
/// * `our_contribution` - The sats amount we intend to contribute to the funding
1894-
// transaction being negotiated.
1895-
/// * `funding_inputs` - List of our inputs. It does not include the shared input (if there is one).
1896-
/// * `shared_input` - Optionally, the amount of the shared input, if there is one.
1897-
/// * `shared_output_funding_script` - The script of the shared output.
1898-
/// * `funding_outputs` - Our funding outputs.
1899-
/// * `funding_feerate_sat_per_1000_weight` - Fee rate to be used.
1900-
/// * `change_output_dust_limit` - The dust limit (in sats) to consider.
1894+
/// - `is_initiator` - Whether we are the negotiation initiator or not (acceptor).
1895+
/// - `our_contribution` - The sats amount we intend to contribute to the funding
1896+
/// transaction being negotiated.
1897+
/// - `funding_inputs` - List of our inputs. It does not include the shared input, if there is one.
1898+
/// - `shared_input` - The locally owned amount of the shared input (in sats), if there is one.
1899+
/// - `shared_output_funding_script` - The script of the shared output.
1900+
/// - `funding_outputs` - Our funding outputs.
1901+
/// - `funding_feerate_sat_per_1000_weight` - Fee rate to be used.
1902+
/// - `change_output_dust_limit` - The dust limit (in sats) to consider.
19011903
pub(super) fn calculate_change_output_value(
19021904
is_initiator: bool, our_contribution: u64,
19031905
funding_inputs: &Vec<(TxIn, TransactionU16LenLimited)>, shared_input: Option<u64>,

0 commit comments

Comments
 (0)