]> Untitled Git - bdk/commitdiff
chore: Fix typos
author志宇 <hello@evanlinjin.me>
Tue, 10 Dec 2024 11:53:12 +0000 (22:53 +1100)
committer志宇 <hello@evanlinjin.me>
Tue, 10 Dec 2024 11:53:12 +0000 (22:53 +1100)
crates/chain/src/canonical_iter.rs
docs/adr/0003_canonicalization_algorithm.md

index 6a12bbf255bcebaba5095d8278e07aca86e2ecad..99550ab7fa4fe8f952461e6eedc054d1f38db07f 100644 (file)
@@ -87,7 +87,7 @@ impl<'g, A: Anchor, C: ChainOracle> CanonicalIter<'g, A, C> {
         Ok(())
     }
 
-    /// Marks a transaction and it's ancestors as canoncial. Mark all conflicts of these as
+    /// Marks a transaction and it's ancestors as canonical. Mark all conflicts of these as
     /// `not_canonical`.
     fn mark_canonical(&mut self, txid: Txid, tx: Arc<Transaction>, reason: CanonicalReason<A>) {
         let starting_txid = txid;
index 503e857e6ba065c1ceb3a7ceaf0db5d6e13405ef..c3062cbc1b1a9e421e219ee4d6d5dbed0f19547c 100644 (file)
@@ -62,9 +62,9 @@ The algorithm's premise is as follows:
 5. A transaction with a higher last-seen has precedence.
 6. Last-seen values are transitive. A transaction's real last-seen value is the max between it's last-seen value all of it's descendants.
 
-Like Option 3's algorithm, we maintain two mutually-exclusive `txid` sets: `canoncial` and `not_canonical`.
+Like Option 3's algorithm, we maintain two mutually-exclusive `txid` sets: `canonical` and `not_canonical`.
 
-Imagine a method `mark_canonical(A)` that is based on premise 1 and 2. This method will mark transaction `A` and all of it's ancestors as canonical. For each transaction that is marked canonical, we can iterate all of it's conflicts and mark those as `non_canonical`. If a transaction already exists in `canoncial` or `not_canonical`, we can break early, avoiding duplicate work.
+Imagine a method `mark_canonical(A)` that is based on premise 1 and 2. This method will mark transaction `A` and all of it's ancestors as canonical. For each transaction that is marked canonical, we can iterate all of it's conflicts and mark those as `non_canonical`. If a transaction already exists in `canonical` or `not_canonical`, we can break early, avoiding duplicate work.
 
 This algorithm iterates transactions in 3 runs.