From cfdbacfbb57fe3c14cc020d0c1d5213d20a5bb34 Mon Sep 17 00:00:00 2001 From: Philipp Hoenisch Date: Fri, 7 May 2021 08:26:30 +1000 Subject: [PATCH] Add comment. The weight of our transactions can fluctuate by +-2 wu because our transactions have 2 signatures --- swap/src/bitcoin.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/swap/src/bitcoin.rs b/swap/src/bitcoin.rs index 17ddfd3d..654b9860 100644 --- a/swap/src/bitcoin.rs +++ b/swap/src/bitcoin.rs @@ -415,7 +415,9 @@ mod tests { ); } - // Weights fluctuate -+2 wu assuming because of the length of the signatures. + // Weights fluctuate -+1 wu because of the length of the signatures. + // Some of our transactions have 2 signatures and hence the weight can fluctuate + // +-2 fn assert_weight(is_weight: usize, expected_weight: usize, tx_name: &str) { assert!( is_weight + 1 == expected_weight