From: Elias Rohrer Date: Wed, 27 Mar 2024 10:50:07 +0000 (+0100) Subject: Move low-R comments into blocks X-Git-Tag: v0.0.123-beta~13^2~12 X-Git-Url: http://git.bitcoin.ninja/?a=commitdiff_plain;h=b6059e9f3942498b0cbf056f25bc3ed37d4cc2bc;p=rust-lightning Move low-R comments into blocks --- 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; } }