}
}
+ pub(crate) fn get_prev_holder_commitment_to_self_value(&self) -> Option<u64> {
+ self.prev_holder_commitment.as_ref().map(|commitment| commitment.to_broadcaster_value_sat())
+ }
+
+ pub(crate) fn get_cur_holder_commitment_to_self_value(&self) -> u64 {
+ self.holder_commitment.to_broadcaster_value_sat()
+ }
+
/// Lightning security model (i.e being able to redeem/timeout HTLC or penalize coutnerparty onchain) lays on the assumption of claim transactions getting confirmed before timelock expiration
/// (CSV or CLTV following cases). In case of high-fee spikes, claim tx may stuck in the mempool, so you need to bump its feerate quickly using Replace-By-Fee or Child-Pay-For-Parent.
/// Panics if there are signing errors, because signing operations in reaction to on-chain events
let new_timer = Some(cached_request.get_height_timer(cur_height));
if cached_request.is_malleable() {
let predicted_weight = cached_request.package_weight(&self.destination_script);
- if let Some((output_value, new_feerate)) = cached_request.compute_package_output(predicted_weight, fee_estimator, logger) {
+ if let Some((output_value, new_feerate)) =
+ cached_request.compute_package_output(predicted_weight, self.destination_script.dust_value().as_sat(), fee_estimator, logger) {
assert!(new_feerate != 0);
let transaction = cached_request.finalize_package(self, output_value, self.destination_script.clone(), logger).unwrap();