Skip to content

Commit eb2ab08

Browse files
jkczyzclaude
andcommitted
f - Simplify FeeRateAdjustmentError match in tx_init_rbf acceptor path
Same simplification as the splice_init path: collapse 3 Err arms into 2 by relying on the Display impl for behavioral suffixes. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 5d09eb7 commit eb2ab08

1 file changed

Lines changed: 2 additions & 17 deletions

File tree

lightning/src/ln/channel.rs

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -12552,17 +12552,6 @@ where
1255212552
Some(c) => {
1255312553
match c.net_value_for_acceptor_at_feerate(feerate, holder_balance.unwrap()) {
1255412554
Ok(net_value) => Some(net_value),
12555-
Err(e @ FeeRateAdjustmentError::FeeRateTooLow { .. }) => {
12556-
log_info!(
12557-
logger,
12558-
"Initiator's RBF feerate ({}) for channel {} is below our minimum: {}; \
12559-
proceeding without queued contribution, will RBF later",
12560-
feerate,
12561-
self.context.channel_id(),
12562-
e,
12563-
);
12564-
None
12565-
},
1256612555
Err(e @ FeeRateAdjustmentError::FeeRateTooHigh { .. }) => {
1256712556
return Err(ChannelError::WarnAndDisconnect(format!(
1256812557
"Cannot accommodate initiator's RBF feerate ({}) for channel {}: {}",
@@ -12571,14 +12560,10 @@ where
1257112560
e,
1257212561
)));
1257312562
},
12574-
Err(
12575-
e @ FeeRateAdjustmentError::FeeBufferInsufficient { .. }
12576-
| e @ FeeRateAdjustmentError::FeeBufferOverflow { .. },
12577-
) => {
12563+
Err(e) => {
1257812564
log_info!(
1257912565
logger,
12580-
"Cannot accommodate initiator's RBF feerate ({}) for channel {}: {}; \
12581-
proceeding without contribution",
12566+
"Cannot accommodate initiator's RBF feerate ({}) for channel {}: {}",
1258212567
feerate,
1258312568
self.context.channel_id(),
1258412569
e,

0 commit comments

Comments
 (0)