File tree 1 file changed +4
-1
lines changed
1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -3705,6 +3705,8 @@ impl<Signer: Sign> Channel<Signer> {
3705
3705
// more dust balance if the feerate increases when we have several HTLCs pending
3706
3706
// which are near the dust limit.
3707
3707
let mut feerate_per_kw = self . feerate_per_kw ;
3708
+ // If there's a pending update fee, use it to ensure we aren't under-estimating
3709
+ // potential feerate updates coming soon.
3708
3710
if let Some ( ( feerate, _) ) = self . pending_update_fee {
3709
3711
feerate_per_kw = cmp:: max ( feerate_per_kw, feerate) ;
3710
3712
}
@@ -4941,9 +4943,10 @@ impl<Signer: Sign> Writeable for Channel<Signer> {
4941
4943
if self . is_outbound ( ) {
4942
4944
self . pending_update_fee . map ( |( a, _) | a) . write ( writer) ?;
4943
4945
} else if let Some ( ( feerate, FeeUpdateState :: AwaitingRemoteRevokeToAnnounce ) ) = self . pending_update_fee {
4944
- // As for inbound HTLCs, if the update was only announced and never committed, drop it.
4945
4946
Some ( feerate) . write ( writer) ?;
4946
4947
} else {
4948
+ // As for inbound HTLCs, if the update was only announced and never committed in a
4949
+ // commitment_signed, drop it.
4947
4950
None :: < u32 > . write ( writer) ?;
4948
4951
}
4949
4952
self . holding_cell_update_fee . write ( writer) ?;
You can’t perform that action at this time.
0 commit comments