Skip to content

Commit 1508ae3

Browse files
committed
chore: Fix typos
1 parent af92199 commit 1508ae3

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

crates/chain/src/canonical_iter.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ impl<'g, A: Anchor, C: ChainOracle> CanonicalIter<'g, A, C> {
8787
Ok(())
8888
}
8989

90-
/// Marks a transaction and it's ancestors as canoncial. Mark all conflicts of these as
90+
/// Marks a transaction and it's ancestors as canonical. Mark all conflicts of these as
9191
/// `not_canonical`.
9292
fn mark_canonical(&mut self, txid: Txid, tx: Arc<Transaction>, reason: CanonicalReason<A>) {
9393
let starting_txid = txid;

docs/adr/0003_canonicalization_algorithm.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,9 @@ The algorithm's premise is as follows:
6262
5. A transaction with a higher last-seen has precedence.
6363
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.
6464

65-
Like Option 3's algorithm, we maintain two mutually-exclusive `txid` sets: `canoncial` and `not_canonical`.
65+
Like Option 3's algorithm, we maintain two mutually-exclusive `txid` sets: `canonical` and `not_canonical`.
6666

67-
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.
67+
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.
6868

6969
This algorithm iterates transactions in 3 runs.
7070

0 commit comments

Comments
 (0)