Skip to content

Commit 4ad6bd6

Browse files
committed
f - re-use P2WPKH_WITNESS_WEIGHT
1 parent 8ad7e8d commit 4ad6bd6

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

lightning/src/sign/mod.rs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -523,13 +523,7 @@ impl SpendableOutputDescriptor {
523523
sequence: Sequence::ZERO,
524524
witness: Witness::new(),
525525
});
526-
const STATIC_OUTPUT_WITNESS_WEIGHT: u64 = (1 /* witness items */
527-
+ 1 /* sig push */
528-
+ bitcoin::secp256k1::constants::MAX_SIGNATURE_SIZE
529-
+ 1 /* pubkey push */
530-
+ bitcoin::secp256k1::constants::PUBLIC_KEY_SIZE)
531-
as u64;
532-
witness_weight += STATIC_OUTPUT_WITNESS_WEIGHT;
526+
witness_weight += P2WPKH_WITNESS_WEIGHT;
533527
#[cfg(feature = "grind_signatures")]
534528
{
535529
// Guarantees a low R signature

0 commit comments

Comments
 (0)