use super::Variant; use crate::simplex::{ scheme::Scheme, types::{Finalization, Notarization}, }; use commonware_cryptography::certificate::Scheme as CertificateScheme; use commonware_utils::channel::oneshot; /// A parsed-but-unverified resolver delivery awaiting batch certificate verification. pub(super) enum PendingVerification where S: Scheme, { Notarized { notarization: Notarization, block: V::Block, response: oneshot::Sender, }, Finalized { finalization: Finalization, block: V::Block, response: oneshot::Sender, }, } impl PendingVerification where S: Scheme, { pub(super) fn response_closed(&self) -> bool { match self { Self::Notarized { response, .. } | Self::Finalized { response, .. } => { response.is_closed() } } } }