Skip to content

Commit ee3d225

Browse files
committed
Remove redundant skips
1 parent 6932d3e commit ee3d225

File tree

4 files changed

+1
-20
lines changed

4 files changed

+1
-20
lines changed

lightning/src/chain/channelmonitor.rs

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2618,7 +2618,6 @@ impl<Signer: EcdsaChannelSigner> ChannelMonitor<Signer> {
26182618
pending_commitment_tx_conf_thresh = Some(conf_thresh);
26192619
}
26202620

2621-
#[rustfmt::skip]
26222621
macro_rules! walk_htlcs {
26232622
($holder_commitment: expr, $counterparty_revoked_commitment: expr, $htlc_iter: expr) => {
26242623
for (htlc, source) in $htlc_iter {
@@ -2868,7 +2867,6 @@ impl<Signer: EcdsaChannelSigner> ChannelMonitor<Signer> {
28682867
}
28692868

28702869
let mut res = new_hash_map();
2871-
#[rustfmt::skip]
28722870
macro_rules! walk_htlcs {
28732871
($holder_commitment: expr, $htlc_iter: expr) => {
28742872
for (htlc, source) in $htlc_iter {
@@ -3329,7 +3327,6 @@ impl<Signer: EcdsaChannelSigner> ChannelMonitorImpl<Signer> {
33293327

33303328
// If the channel is force closed, try to claim the output from this preimage.
33313329
// First check if a counterparty commitment transaction has been broadcasted:
3332-
#[rustfmt::skip]
33333330
macro_rules! claim_htlcs {
33343331
($commitment_number: expr, $txid: expr, $htlcs: expr) => {
33353332
let (htlc_claim_reqs, _) = self.get_counterparty_output_claim_info($commitment_number, $txid, None, $htlcs);
@@ -3836,7 +3833,6 @@ impl<Signer: EcdsaChannelSigner> ChannelMonitorImpl<Signer> {
38363833
let commitment_txid = tx.compute_txid(); //TODO: This is gonna be a performance bottleneck for watchtowers!
38373834
let per_commitment_option = self.funding.counterparty_claimable_outpoints.get(&commitment_txid);
38383835

3839-
#[rustfmt::skip]
38403836
macro_rules! ignore_error {
38413837
( $thing : expr ) => {
38423838
match $thing {
@@ -4186,13 +4182,12 @@ impl<Signer: EcdsaChannelSigner> ChannelMonitorImpl<Signer> {
41864182
let mut claim_requests = Vec::new();
41874183
let mut watch_outputs = Vec::new();
41884184

4189-
#[rustfmt::skip]
41904185
macro_rules! append_onchain_update {
41914186
($updates: expr, $to_watch: expr) => {
41924187
claim_requests = $updates.0;
41934188
self.broadcasted_holder_revokable_script = $updates.1;
41944189
watch_outputs.append(&mut $to_watch);
4195-
}
4190+
};
41964191
}
41974192

41984193
// HTLCs set may differ between last and previous holder commitment txn, in case of one them hitting chain, ensure we cancel all HTLCs backward
@@ -4968,7 +4963,6 @@ impl<Signer: EcdsaChannelSigner> ChannelMonitorImpl<Signer> {
49684963
}
49694964
}
49704965

4971-
#[rustfmt::skip]
49724966
macro_rules! check_htlc_valid_counterparty {
49734967
($htlc_output: expr, $per_commitment_data: expr) => {
49744968
for &(ref pending_htlc, ref pending_source) in $per_commitment_data {
@@ -4983,7 +4977,6 @@ impl<Signer: EcdsaChannelSigner> ChannelMonitorImpl<Signer> {
49834977
}
49844978
}
49854979

4986-
#[rustfmt::skip]
49874980
macro_rules! scan_commitment {
49884981
($htlcs: expr, $tx_info: expr, $holder_tx: expr) => {
49894982
for (ref htlc_output, source_option) in $htlcs {
@@ -5309,7 +5302,6 @@ impl<'a, 'b, ES: EntropySource, SP: SignerProvider> ReadableArgs<(&'a ES, &'b SP
53095302

53105303
let commitment_secrets = Readable::read(reader)?;
53115304

5312-
#[rustfmt::skip]
53135305
macro_rules! read_htlc_in_commitment {
53145306
() => {
53155307
{
@@ -5809,7 +5801,6 @@ mod tests {
58095801

58105802
let dummy_source = HTLCSource::dummy();
58115803

5812-
#[rustfmt::skip]
58135804
macro_rules! preimages_slice_to_htlcs {
58145805
($preimages_slice: expr) => {
58155806
{
@@ -5827,7 +5818,6 @@ mod tests {
58275818
}
58285819
}
58295820
}
5830-
#[rustfmt::skip]
58315821
macro_rules! preimages_slice_to_htlc_outputs {
58325822
($preimages_slice: expr) => {
58335823
preimages_slice_to_htlcs!($preimages_slice).into_iter().map(|htlc| (htlc, None)).collect()
@@ -5837,7 +5827,6 @@ mod tests {
58375827
&bitcoin::secp256k1::Message::from_digest([42; 32]),
58385828
&SecretKey::from_slice(&[42; 32]).unwrap());
58395829

5840-
#[rustfmt::skip]
58415830
macro_rules! test_preimages_exist {
58425831
($preimages_slice: expr, $monitor: expr) => {
58435832
for preimage in $preimages_slice {
@@ -5968,7 +5957,6 @@ mod tests {
59685957
let pubkey = PublicKey::from_secret_key(&secp_ctx, &privkey);
59695958

59705959
use crate::ln::channel_keys::{HtlcKey, HtlcBasepoint};
5971-
#[rustfmt::skip]
59725960
macro_rules! sign_input {
59735961
($sighash_parts: expr, $idx: expr, $amount: expr, $weight: expr, $sum_actual_sigs: expr, $opt_anchors: expr) => {
59745962
let htlc = HTLCOutputInCommitment {

lightning/src/chain/onchaintx.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -942,7 +942,6 @@ impl<ChannelSigner: EcdsaChannelSigner> OnchainTxHandler<ChannelSigner> {
942942
}
943943
}
944944

945-
#[rustfmt::skip]
946945
macro_rules! clean_claim_request_after_safety_delay {
947946
() => {
948947
let entry = OnchainEventEntry {

lightning/src/ln/channel.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4424,7 +4424,6 @@ where
44244424
self.channel_id,
44254425
if local { "us" } else { "remote" }, if generated_by_local { "us" } else { "remote" }, feerate_per_kw);
44264426

4427-
#[rustfmt::skip]
44284427
macro_rules! get_htlc_in_commitment {
44294428
($htlc: expr, $offered: expr) => {
44304429
HTLCOutputInCommitment {
@@ -4437,7 +4436,6 @@ where
44374436
}
44384437
}
44394438

4440-
#[rustfmt::skip]
44414439
macro_rules! add_htlc_output {
44424440
($htlc: expr, $outbound: expr, $source: expr) => {
44434441
let htlc_in_tx = get_htlc_in_commitment!($htlc, $outbound == local);
@@ -6971,7 +6969,6 @@ where
69716969
let release_monitor = self.context.blocked_monitor_updates.is_empty() && !hold_mon_update;
69726970
let release_state_str =
69736971
if hold_mon_update { "Holding" } else if release_monitor { "Releasing" } else { "Blocked" };
6974-
#[rustfmt::skip]
69756972
macro_rules! return_with_htlcs_to_fail {
69766973
($htlcs_to_fail: expr) => {
69776974
if !release_monitor {
@@ -8398,7 +8395,6 @@ where
83988395

83998396
let (our_min_fee, our_max_fee) = self.calculate_closing_fee_limits(fee_estimator);
84008397

8401-
#[rustfmt::skip]
84028398
macro_rules! propose_fee {
84038399
($new_fee: expr) => {
84048400
let (closing_tx, used_fee) = if $new_fee == msg.fee_satoshis {

lightning/src/ln/outbound_payment.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1441,7 +1441,6 @@ impl OutboundPayments {
14411441
}
14421442
}
14431443

1444-
#[rustfmt::skip]
14451444
macro_rules! abandon_with_entry {
14461445
($payment: expr, $reason: expr) => {
14471446
$payment.get_mut().mark_abandoned($reason);
@@ -2465,7 +2464,6 @@ impl OutboundPayments {
24652464
let path_amt = path.final_value_msat();
24662465
let path_fee = path.fee_msat();
24672466

2468-
#[rustfmt::skip]
24692467
macro_rules! new_retryable {
24702468
() => {
24712469
PendingOutboundPayment::Retryable {

0 commit comments

Comments
 (0)