Skip to content

Distribute Open invitations to K users

onyinyang requested to merge onyinyang/lox:k-invites into main

This MR changes the way that open invitations are distributed based on a constant OPENINV_K, which is currently set to 10. Before: an open invitation bucket was chosen randomly from the list of open invitation buckets. Now: an open invitation bucket is chosen randomly from the list of open invitation buckets for the first user, then the same bucket is given to the next 9 users. After that, the cycle starts again. Since the trust migration tables are created when a new open invtation bucket is inserted into the bridge table, open invitation buckets can be removed from Lox bridgedb's list of open invitation buckets once they are distributed to the first user and appended to a vector of distributed buckets and read from the end of the vector until we reach OPENINV_K. When bridges are blocked or the bucket expires as an open invitation bucket (it has been an open invitation bucket for 511 days or more), the open invitation as well as distributed bucket lists are cleaned up.

Addresses #25 (closed).

Edited by onyinyang

Merge request reports