Skip to main content

settle_member

Function settle_member 

Source
pub(crate) fn settle_member(
    request_id: &str,
    outcome: Settled,
    askers: &[&str],
    is_open: &dyn Fn(&str) -> bool,
) -> (bool, Option<(String, String)>)
Expand description

Record how request_id ended, with askers, the agents that ask for it now. Returns whether its own note is left out (it is a member and the group’s agent is the only asker), and the note to send when that finished its group. Both come from one look at the groups, so a deadline that ends the group in between can’t make a request look held when it is not. A request the group’s agent no longer asks for alone is recorded as not decided for the group, so the group’s note never reports an answer that was another agent’s.