File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -862,8 +862,12 @@ impl<Signer: Sign> Channel<Signer> {
862
862
where F :: Target : FeeEstimator
863
863
{
864
864
let lower_limit = fee_estimator. get_est_sat_per_1000_weight ( ConfirmationTarget :: Background ) ;
865
- if feerate_per_kw < lower_limit {
866
- return Err ( ChannelError :: Close ( format ! ( "Peer's feerate much too low. Actual: {}. Our expected lower limit: {}" , feerate_per_kw, lower_limit) ) ) ;
865
+ // Some fee estimators round up to the next full sat/vbyte (ie 250 sats per kw), causing
866
+ // occasional issues with feerate disagreements between an initiator that wants a feerate
867
+ // of 1.1 sat/vbyte and a receiver that wants 1.1 rounded up to 2. Thus, we always add 250
868
+ // sat/kw before the comparison here.
869
+ if feerate_per_kw + 250 < lower_limit {
870
+ return Err ( ChannelError :: Close ( format ! ( "Peer's feerate much too low. Actual: {}. Our expected lower limit: {} (- 250)" , feerate_per_kw, lower_limit) ) ) ;
867
871
}
868
872
// We only bound the fee updates on the upper side to prevent completely absurd feerates,
869
873
// always accepting up to 25 sat/vByte or 10x our fee estimator's "High Priority" fee.
You can’t perform that action at this time.
0 commit comments