From b6059e9f3942498b0cbf056f25bc3ed37d4cc2bc Mon Sep 17 00:00:00 2001 From: Elias Rohrer Date: Wed, 27 Mar 2024 11:50:07 +0100 Subject: [PATCH] Move low-R comments into blocks --- lightning/src/sign/mod.rs | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/lightning/src/sign/mod.rs b/lightning/src/sign/mod.rs index 7b9dba0dc..fd992a594 100644 --- a/lightning/src/sign/mod.rs +++ b/lightning/src/sign/mod.rs @@ -368,7 +368,9 @@ impl SpendableOutputDescriptor { }); witness_weight += descriptor.max_witness_length(); #[cfg(feature = "grind_signatures")] - { witness_weight -= 1; } // Guarantees a low R signature + { // Guarantees a low R signature + witness_weight -= 1; + } input_value += descriptor.output.value; }, SpendableOutputDescriptor::DelayedPaymentOutput(descriptor) => { @@ -381,7 +383,9 @@ impl SpendableOutputDescriptor { }); witness_weight += DelayedPaymentOutputDescriptor::MAX_WITNESS_LENGTH; #[cfg(feature = "grind_signatures")] - { witness_weight -= 1; } // Guarantees a low R signature + { // Guarantees a low R signature + witness_weight -= 1; + } input_value += descriptor.output.value; }, SpendableOutputDescriptor::StaticOutput { ref outpoint, ref output, .. } => { @@ -394,7 +398,9 @@ impl SpendableOutputDescriptor { }); witness_weight += 1 + 73 + 34; #[cfg(feature = "grind_signatures")] - { witness_weight -= 1; } // Guarantees a low R signature + { // Guarantees a low R signature + witness_weight -= 1; + } input_value += output.value; } } -- 2.39.5