From b6cb1be7c33d2567a3acd1cc5ddc129ba2eea2ff Mon Sep 17 00:00:00 2001 From: yeahyear <138094847+yetyear@users.noreply.github.com> Date: Thu, 14 Mar 2024 01:16:17 +0800 Subject: [PATCH] chore: fix some comments (#3728) Signed-off-by: yetyear Co-authored-by: satoshiotomakan <127754187+satoshiotomakan@users.noreply.github.com> --- rust/tw_bitcoin/tests/p2tr_script_path.rs | 2 +- rust/tw_utxo/src/compiler.rs | 2 +- trezor-crypto/crypto/bignum.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/rust/tw_bitcoin/tests/p2tr_script_path.rs b/rust/tw_bitcoin/tests/p2tr_script_path.rs index aeb0e901be3..7f70c76b772 100644 --- a/rust/tw_bitcoin/tests/p2tr_script_path.rs +++ b/rust/tw_bitcoin/tests/p2tr_script_path.rs @@ -106,7 +106,7 @@ fn coin_entry_custom_script_path() { .control_block(&(payload.to_owned(), LeafVersion::TapScript)) .unwrap(); - // Provide the the payload and control block directly to the builder. + // Provide the payload and control block directly to the builder. let tx1 = Proto::Input { txid: txid.as_slice().into(), vout: 0, diff --git a/rust/tw_utxo/src/compiler.rs b/rust/tw_utxo/src/compiler.rs index 822cd8a3542..cdb2625e21e 100644 --- a/rust/tw_utxo/src/compiler.rs +++ b/rust/tw_utxo/src/compiler.rs @@ -182,7 +182,7 @@ impl Compiler { let weight_estimate = tx.weight().to_wu() + total_input_weight; let fee_estimate = (weight_estimate + 3) / 4 * proto.weight_base; - // Check if there are enough inputs to cover the the full output and fee estimate. + // Check if there are enough inputs to cover the full output and fee estimate. if total_input_amount < total_output_amount + fee_estimate { return Err(Error::from(Proto::Error::Error_insufficient_inputs)); } diff --git a/trezor-crypto/crypto/bignum.c b/trezor-crypto/crypto/bignum.c index 85b8b0172e7..5791448d100 100644 --- a/trezor-crypto/crypto/bignum.c +++ b/trezor-crypto/crypto/bignum.c @@ -46,7 +46,7 @@ A limb of a bignum256 is *normalized* iff it's less than 2**29. A bignum256 is *normalized* iff every its limb is normalized. A number is *fully reduced modulo p* iff it is less than p. - A number is *partly reduced modulo p* iff is is less than 2*p. + A number is *partly reduced modulo p* iff it is less than 2*p. The number p is usually a prime number such that 2^256 - 2^224 <= p <= 2^256. All functions except bn_fast_mod expect that all their bignum256 inputs are