nixfleet_reconciler/planner_gates/
quarantine.rs1use crate::planner_gates::GateBlock;
9use crate::planner_types::{ChannelId, ClosureHash, QuarantineSet};
10
11pub fn check(
12 quarantines: &QuarantineSet,
13 channel: &ChannelId,
14 target_closure: &ClosureHash,
15) -> Option<GateBlock> {
16 let set = quarantines.get(channel)?;
17 if set.contains(target_closure) {
18 Some(GateBlock::Quarantined {
19 channel: channel.clone(),
20 closure_hash: target_closure.clone(),
21 })
22 } else {
23 None
24 }
25}