Skip to content

Commit 1a84426

Browse files
committed
rename least to latest
1 parent 189d545 commit 1a84426

File tree

1 file changed

+4
-4
lines changed
  • consensus/src/processes/pruning_proof

1 file changed

+4
-4
lines changed

consensus/src/processes/pruning_proof/build.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ impl PruningProofManager {
9595
.map_err(|err| format!("level + 1: {}, err: {}", level + 1, err))
9696
.unwrap();
9797

98-
self.find_least_common_ancestor_in_store(
98+
self.find_latest_common_ancestor_in_store(
9999
&*ghostdag_stores[level],
100100
block_at_depth_m_at_next_level,
101101
block_at_depth_2m,
@@ -203,14 +203,14 @@ impl PruningProofManager {
203203
}
204204

205205
/// Given two hashes (both are assumed to exist in the passed ghostdag store),
206-
/// find their least common ancestor. The least common ancestor is minimum block
206+
/// find their latest common ancestor. The latest common ancestor is minimum block
207207
/// such that both 'a' and 'b' are either equal to it or in its future.
208208
/// This ancestor must also be in the selected parent chain of 'a'.
209209
///
210210
/// Additional Notes:
211211
/// - 'a' and 'b' are expected to be hashes acquired via block_at_depth.
212212
/// By virtue of this, they are both chain block hashes.
213-
fn find_least_common_ancestor_in_store(
213+
fn find_latest_common_ancestor_in_store(
214214
&self,
215215
ghostdag_store: &DbGhostdagStore,
216216
a: Hash,
@@ -324,7 +324,7 @@ impl PruningProofManager {
324324
self.block_at_depth(&*ghostdag_store, selected_tip, required_level_depth + SAFETY_MARGIN).unwrap();
325325

326326
root = self
327-
.find_least_common_ancestor_in_store(
327+
.find_latest_common_ancestor_in_store(
328328
&*ghostdag_store,
329329
block_at_depth_m_at_next_level,
330330
block_at_depth_2m_buffered,

0 commit comments

Comments
 (0)