Skip to main content

with_ctx

Function with_ctx 

Source
pub(super) fn with_ctx<R>(
    store: &Store,
    wan: &WanIdentityStore,
    pinned_since: Option<i64>,
    f: impl FnOnce(&mut Ctx<'_>) -> R,
) -> Result<R, RemoteRefusal>
Expand description

Everything an op needs from this machine, then f: this install’s identity, the computer’s lock, the chains read back from the store and the caller’s proof. The store stays locked for as long as f runs and no longer, so f never waits on another machine (that one may be asking this one for the same store).