From 29e86dcff079c3972e32a2bde99d2fd7f708571c Mon Sep 17 00:00:00 2001 From: Pol Espinasa Date: Thu, 2 May 2024 13:20:12 +0200 Subject: [PATCH] Improve comments --- server/grouphug-server/src/utils/transactions.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/server/grouphug-server/src/utils/transactions.rs b/server/grouphug-server/src/utils/transactions.rs index b4cab9a..3238ebd 100644 --- a/server/grouphug-server/src/utils/transactions.rs +++ b/server/grouphug-server/src/utils/transactions.rs @@ -167,12 +167,11 @@ pub fn validate_tx_query_one_to_one_single_anyone_can_pay(tx_hex: &str ) -> (boo // Validate that a given transaction (in hex) is valid according to the rules. // Returns true if the tx is valid. String with the error message if any and a f32 with the fee_rate of the transaction // Rules: - // - Should only be 1 input. - // - Should only be 1 output. + // - Must have same number of inputs and outputs. // - The input cannot be spent before must be and UTXO. // - Signature must be SIGHASH_SINGLE | ANYONECANPAY. - // - Should have absolute locktime to 0. - // - Fee rate should be bigger than 1.01sat/vb + // - Must have absolute locktime to 0. + // - Fee rate must be bigger than 1.01sat/vb let mut real_fee_rate: f32 = 0.0;