VerifierCache

/// Verifier cache for caching expensive verification results.
/// Specifically the following -
///   * kernel signature verification
///   * output rangeproof verification

filter_kernel_sig_unverified

    /// Takes a vec of tx kernels and returns those kernels
    /// that have not yet been verified.

filter_rangeproof_unverified

    /// Takes a vec of tx outputs and returns those outputs
    /// that have not yet had their rangeproofs verified.

add_kernel_sig_verified

/// Adds a vec of tx kernels to the cache (used in conjunction with the the filter above).

add_rangeproof_verified

/// Adds a vec of outputs to the cache (used in conjunction with the the filter above).

LruVerifierCache

/// An implementation of verifier_cache using lru_cache.
/// Caches tx kernels by kernel hash.
/// Caches outputs by output rangeproof hash (rangeproofs are committed to separately).
pub struct LruVerifierCache {
    kernel_sig_verification_cache: LruCache<Hash, bool>,
    rangeproof_verification_cache: LruCache<Hash, bool>,
}

results matching ""

    No results matching ""