Skip to content

Commit

Permalink
Implement is_bucket_matching method
Browse files Browse the repository at this point in the history
  • Loading branch information
adzialocha committed Nov 16, 2024
1 parent 5e6f22d commit 052c912
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions rhio/src/node/actor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -392,8 +392,20 @@ fn is_subject_matching(subscriptions: &Vec<Subscription>, incoming: &ScopedSubje
}

/// Returns true if incoming blob announcement is of interested to our local node.
#[allow(unused_variables)]
fn is_bucket_matching(subscriptions: &Vec<Subscription>, incoming: &ScopedBucket) -> bool {
// @TODO
for subscription in subscriptions {
match subscription {
Subscription::Bucket { bucket } => {
if bucket == incoming {
return true;
} else {
continue;
}
}
Subscription::Subject { .. } => {
continue;
}
}
}
false
}

0 comments on commit 052c912

Please sign in to comment.