Skip to content

Commit 16c3b09

Browse files
committed
fix: Don't loop infinitely if there is a loop in the verification chain
1 parent dec6e3a commit 16c3b09

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/self_reporting.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ async fn get_contact_stats(context: &Context) -> Result<Vec<ContactStat>> {
124124
let mut has_bot = false;
125125
let mut current_verifier_id = contact.id;
126126

127-
while current_verifier_id != ContactId::SELF {
127+
while current_verifier_id != ContactId::SELF && transitive_chain < 100 {
128128
current_verifier_id = match verified_by_map.get(&current_verifier_id) {
129129
Some(id) => *id,
130130
None => {

0 commit comments

Comments
 (0)