From ed21b40b924c9b5dfee80cf6e087a888ac1c6d77 Mon Sep 17 00:00:00 2001 From: fudancoder Date: Thu, 13 Jun 2024 23:38:42 +0800 Subject: [PATCH] chore: fix some comments Signed-off-by: fudancoder --- components/addressmanager/src/lib.rs | 2 +- components/consensusmanager/src/lib.rs | 2 +- crypto/txscript/src/opcodes/mod.rs | 2 +- wasm/examples/nodejs/javascript/transactions/generator.js | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/components/addressmanager/src/lib.rs b/components/addressmanager/src/lib.rs index 85f9acb3e..b141574c2 100644 --- a/components/addressmanager/src/lib.rs +++ b/components/addressmanager/src/lib.rs @@ -596,7 +596,7 @@ mod address_store_with_cache { // The target uniform distribution let target_u_dist = Uniform::new(0.0, (num_of_buckets) as f64).unwrap(); for _ in 0..num_of_trials { - // The weight sampled expected uniform distibution + // The weight sampled expected uniform distribution let prioritized_address_distribution = am .lock() .iterate_prioritized_random_addresses(HashSet::new()) diff --git a/components/consensusmanager/src/lib.rs b/components/consensusmanager/src/lib.rs index 54bdda40b..5f70c5c9d 100644 --- a/components/consensusmanager/src/lib.rs +++ b/components/consensusmanager/src/lib.rs @@ -212,7 +212,7 @@ impl StagingConsensus { // Drop `prev` so that deletion below succeeds drop(prev); // Staging was committed and is now the active consensus so we can delete - // any pervious, now inactive, consensus entries + // any previous, now inactive, consensus entries self.manager.delete_inactive_consensus_entries(); } diff --git a/crypto/txscript/src/opcodes/mod.rs b/crypto/txscript/src/opcodes/mod.rs index 5d6096b7a..9860a8dd8 100644 --- a/crypto/txscript/src/opcodes/mod.rs +++ b/crypto/txscript/src/opcodes/mod.rs @@ -2749,7 +2749,7 @@ mod test { (1u64, vec![], false), // Case 1: 0 = locktime < txLockTime (0x800000, vec![0x7f, 0, 0], false), // Case 2: 0 < locktime < txLockTime (0x800000, vec![0x7f, 0, 0, 0, 0, 0, 0, 0, 0], true), // Case 3: locktime too big - (LOCK_TIME_THRESHOLD * 2, vec![0x7f, 0, 0, 0], true), // Case 4: lock times are inconsistant + (LOCK_TIME_THRESHOLD * 2, vec![0x7f, 0, 0, 0], true), // Case 4: lock times are inconsistent ] { let mut tx = base_tx.clone(); tx.0.lock_time = tx_lock_time; diff --git a/wasm/examples/nodejs/javascript/transactions/generator.js b/wasm/examples/nodejs/javascript/transactions/generator.js index ca6819f08..fa3f4f3ae 100644 --- a/wasm/examples/nodejs/javascript/transactions/generator.js +++ b/wasm/examples/nodejs/javascript/transactions/generator.js @@ -67,7 +67,7 @@ const { encoding, networkId, address : destinationAddress } = require("../utils" // to the change address. // // If the requested amount is greater than the Kaspa - // transactoin mass, the Generator will create multiple + // transaction mass, the Generator will create multiple // transactions where each transaction will forward // UTXOs to the change address, until the requested // amount is reached. It will then create a final