You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The areCausallyRelatedUsingBFS function incorrectly uses DFS instead of BFS by employing a stack.
Additionally, it duplicates traversal logic when checking for causality in both directions (hash1 -> hash2 and hash2 -> hash1). This function should be refactored to use a queue for BFS and to separate the traversal logic into a reusable helper function to improve readability and maintainability.
File: packages/object/src/hashgraph/index.ts
The text was updated successfully, but these errors were encountered:
The
areCausallyRelatedUsingBFS
function incorrectly uses DFS instead of BFS by employing a stack.Additionally, it duplicates traversal logic when checking for causality in both directions (hash1 -> hash2 and hash2 -> hash1). This function should be refactored to use a queue for BFS and to separate the traversal logic into a reusable helper function to improve readability and maintainability.
File:
packages/object/src/hashgraph/index.ts
The text was updated successfully, but these errors were encountered: