ic-auth 0.49.1

Canonical authentication, proof verification and bounded receiver/issuer state with optional stable upgrade checkpoints
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
//! Test-build-only interruptions between actual receiver publication mutations.
#[cfg(feature = "ed25519-verification")]
mod tests;

use std::cell::Cell;

thread_local! {
    static REMAINING: Cell<Option<usize>> = const { Cell::new(None) };
}

pub(super) fn point() {
    REMAINING.with(|remaining| match remaining.get() {
        Some(0) => std::panic::panic_any("auth-publication-fault"),
        Some(n) => remaining.set(Some(n - 1)),
        None => {}
    });
}