Skip to content

Commit

Permalink
Slightly increase the allowed fee upper limit on remote update_fees
Browse files Browse the repository at this point in the history
At least lnd is fairly aggressively high in their (non-anchor) fee
estimation, running the risk of force-closure. Further, because we
rely on a fee estimator we don't have full control over, we should
not assume our users' fees are particularly conservative, and thus
give our peers a lot of leeway.
  • Loading branch information
TheBlueMatt committed Jul 21, 2021
1 parent f569988 commit fd5d84b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lightning/src/ln/channel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -676,7 +676,7 @@ impl<Signer: Sign> Channel<Signer> {
if feerate_per_kw < lower_limit {
return Err(ChannelError::Close(format!("Peer's feerate much too low. Actual: {}. Our expected lower limit: {}", feerate_per_kw, lower_limit)));
}
let upper_limit = fee_estimator.get_est_sat_per_1000_weight(ConfirmationTarget::HighPriority) as u64 * 2;
let upper_limit = fee_estimator.get_est_sat_per_1000_weight(ConfirmationTarget::HighPriority) as u64 * 4;
if feerate_per_kw as u64 > upper_limit {
return Err(ChannelError::Close(format!("Peer's feerate much too high. Actual: {}. Our expected upper limit: {}", feerate_per_kw, upper_limit)));
}
Expand Down

0 comments on commit fd5d84b

Please sign in to comment.